question wit dbx

question wit dbx

Post by R3Li » Sun, 27 Feb 2000 04:00:00



Hi, i am really new to unix, and i am trying to debug a program, i am using
dbx,
i get a segmentation fault (core dumped).
i run dbx, then run the .exe and gives me this output:

signal Segmentation fault at >* [fprintf, (hex number here)]    ldq r16,
40(r16)

i release that the fault is happening on or before a fprintf in my program
(am i right in assuming that?)
what i don't quit understand is the stuff towards the end of the line
the
ldq    r16 40(r16)

what does that mean?

i guessed that it mean
"line 40, right 16"

just a guess.
any help would be GREATLY appreciated =o)
thnx

Jason

 
 
 

question wit dbx

Post by Bjorn Rees » Sun, 27 Feb 2000 04:00:00



> i release that the fault is happening on or before a fprintf in my program

Type 'where' to get a stack trace.

Segmentation faults usually happens in *printf when you feed the function
with NULL pointers. Did you remember to check that fopen etc. succeeded?

Quote:> what i don't quit understand is the stuff towards the end of the line the
> ldq    r16 40(r16)

> what does that mean?

It is assembly code. You may have to compiler your program with debugging
information to get more usable information about the error.

 
 
 

1. dbx: Can dbx read core files from different machines?

dbx barfs with:

core file header read successfully
dbx: core file read error: address 0xef7fbf78 not available
dbx: panic: Proc::get_rtld_stuff(): could not initialize rtld_db

when trying to load a core file from another machine.

Surely, DBX can read cores generated on a different arch/memory
config!

And yes, I have patched dbx with the latest.

Any ideas, pointers?

Steve

2. OpenBSD 2.2 rc.conf *SUPRISE*

3. How to create DBX and non-DBX libraries?

4. telnetd: open /dev/ptmx: No such device.

5. Wit's end question -- files go to print spooler and are never printed

6. Mountd Question

7. DBX question

8. X vs Motif

9. dbx question

10. 4.3BSD dbx question: internal error?

11. Question : use to dbx

12. dbx question: how to trace deletion of specific object?