🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
4 messages
4 total messages Started by Miron Cuperman Sat, 12 Sep 1992 09:27
3.0 gdb does not work?
#990
Author: Miron Cuperman
Date: Sat, 12 Sep 1992 09:27
46 lines
1895 bytes
When I try to run gdb, it fails to even create the child process.
For example, trying gdb on /bin/cat:

------------------------
% gdb -nx /bin/cat
Reading symbol data from /bin/cat...
(no debugging symbols found)...done.
Reading symbol data from /usr/shlib/libsys_s.B.shlib...done.
(gdb) b abort
Breakpoint 1 at 0x505358a
(gdb) run
Starting program: /bin/cat 
Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
^CProgram generated(1): Memory access exception on address 0x7d6f8 (invalid address).
Quit
0x501e7fa in _cproc_fork_child ()
(gdb) bt
#0  0x501e7fa in _cproc_fork_child ()
#1  0x502e444 in _cthread_fork_child ()
#2  0x5008544 in fork ()
#3  0x2ff2e in ?? ()
#4  0x1b83e in ?? ()
#5  0x3bea in ?? ()
#6  0x25d30 in ?? ()
#7  0x3cb8 in ?? ()
#8  0x3a78 in ?? ()
(gdb) 
------------------------

The ps output:
  568 p1 SW    0:01 gdb -nx /bin/cat
  569 p1 HW    0:00 gdb -nx /bin/cat

Attaching to a running process works fine.

Anybody know what is going on?
-- 
	Miron Cuperman <miron@extropia.wimsey.bc.ca>	(NeXTmail ok)
		       <miron@cs.sfu.ca>
	AMIX: MCuperman

ImmortalCyberComputingLaissezfaire
Re: 3.0 gdb does not work? (Oh yes it does!)
#1014
Author: Richard O'Neill
Date: Sun, 13 Sep 1992 23:46
57 lines
2450 bytes
Miron Cuperman <miron@extropia.wimsey.bc.ca> writes:
>When I try to run gdb, it fails to even create the child process.
>For example, trying gdb on /bin/cat:

Well, I took your example and tried it myself on my NS 3.0 (release) machine
and it worked fine...

Maybe your 3.0 installation is screwed or something...

    Richard.

(Boring details follow...)

>% gdb -nx /bin/cat
>Reading symbol data from /bin/cat...
>(no debugging symbols found)...done.
>Reading symbol data from /usr/shlib/libsys_s.B.shlib...done.
>(gdb) b abort
>Breakpoint 1 at 0x505358a
>(gdb) run
>Starting program: /bin/cat 
>Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
>Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
>Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
>Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
>Program generated(1): Memory access exception on address 0x7d6f8 (invalid address).
>^CProgram generated(1): Memory access exception on address 0x7d6f8 (invalid address).
>Quit
>0x501e7fa in _cproc_fork_child ()
>(gdb) bt
>#0  0x501e7fa in _cproc_fork_child ()
>#1  0x502e444 in _cthread_fork_child ()
>#2  0x5008544 in fork ()
>#3  0x2ff2e in ?? ()
>#4  0x1b83e in ?? ()
>#5  0x3bea in ?? ()
>#6  0x25d30 in ?? ()
>#7  0x3cb8 in ?? ()
>#8  0x3a78 in ?? ()
>(gdb) 

% gdb /bin/cat
Reading symbol data from /bin/cat...
(no debugging symbols found)...done.
Reading symbol data from /usr/shlib/libsys_s.B.shlib...done.
(gdb) run
Starting program: /bin/cat 
No apparent problems here...
No apparent problems here...
^D
Program exited normally.
(gdb) Quit
% 
-- 
Composing a suitably apt and witty | [Mail to home machine is down right now]
signature and disclaimer is left   | oneill@fornax.UUCP | NeXTmail OK, but
as an exercise for the reader.     | oneill@cs.sfu.ca   | not >100K OK!
Re: 3.0 gdb does not work?
#1057
Author: Vince Demarco
Date: Mon, 14 Sep 1992 03:54
52 lines
1945 bytes
I also have a similar problem with gdb in 3.0 here is some sample
output.

<gdb running as root>
# gdb a.out
Reading symbol data from a.out...done.
Reading symbol data from /usr/shlib/libsys_s.B.shlib...done.
(gdb) run
Starting program: /private/tmp/a.out 
asdf

Program exited normally.
(gdb) 
# 
# su vince
<gdb is now running as a normal user>
1 -[/tmp]: gdb a.out
Reading symbol data from a.out...done.
Reading symbol data from /usr/shlib/libsys_s.B.shlib...done.
(gdb) run
Starting program: /private/tmp/a.out 
Problem attaching to pid 937.
(gdb) 
2 -[/tmp]: 


------------
Everything is fine if you run gdb as root, which leads me to believe
that it is a problem with permissions someplace. I tryed setting gdb
to setuid root, but nothing helped.  

if i try this:
18 -[/tmp]: gdb -nx /bin/ls
Reading symbol data from /bin/ls...
(no debugging symbols found)...done.
Reading symbol data from /usr/shlib/libsys_s.B.shlib...done.
(gdb) run
Starting program: /bin/ls 
Problem attaching to pid 1028.

I get the same result.

Any help would be greately appreciated.

And by the way, when i installed 3.0 i reformated my HD, i didn't use
the Upgrade 3.0 application.

vince

vince@whatnxt.cuc.ab.ca    (NeXT Mail accepted)
demarco@cpsc.ucalgary.ca
Re: 3.0 gdb does not work? (Oh yes it does!)
#1048
Author: Miron Cuperman
Date: Tue, 15 Sep 1992 05:14
18 lines
1124 bytes
oneill@cs.sfu.ca (Richard O'Neill) writes:

>Miron Cuperman <miron@extropia.wimsey.bc.ca> writes:
>>When I try to run gdb, it fails to even create the child process.
>>For example, trying gdb on /bin/cat:

>Well, I took your example and tried it myself on my NS 3.0 (release) machine
>and it worked fine...

I've found that if the stack limit is set to a power of two (like 8192)
gdb works fine.  gdb stops working if you set the stack limit to something
like 10000 ("limit stacksize 10000").  Interesting.
-- 
	Miron Cuperman <miron@extropia.wimsey.bc.ca>	(NeXTmail ok)
		       <miron@cs.sfu.ca>
	AMIX: MCuperman

ImmortalCyberComputingLaissezfaire
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads