[Scottish] debug

Huard, Elise - D C&W Consultant Elise.Huard at sbs.siemens.co.uk
Thu Jan 29 15:40:57 GMT 2004


just to give feedback on the question below :
i'm afraid that on our AIX system 'gdb on', 'bt' as well as 'whereami' were
met with blunt incomprehension :-)

What did it for me to find what had gone wrong for that particular core file
(to move up and down the trace)
print <variable> ( *<variable if pointer>)
dump (to give local variables + values at current level)

Those did yield the exact point before segmentation fault (line in source),
but the variable values provided were often rubbish (something with invalid
integer ptr)

I'm working with multi-language executables, and i found dbx is more
unforgiving : all the parts of the exec had to be compiled with debugging on
(no stripping at ANY level), while 'debug' on NUMA worked with only partial
debugging compilation (only recompilation -g of those parts that had gone

> ----------
> From: 	Allan Whiteford[SMTP:allan at whiteford.org.uk]
> Reply To: 	SLUG-list
> Sent: 	22 January 2004 14:45
> To: 	SLUG-list
> Subject: 	Re: [Scottish] debug
> Huard, Elise - D C&W Consultant wrote:
> > Hi,
> > 
> > what would you say are the most useful commands for dbx ? 
> "help" :).
> What commands are useful depends on if you're stepping through code as 
> it runs or examine a core file. If you're familiar with gdb then a lot 
> of versions of dbx include the command "gdb on" which allow you to use 
> gdb style commands such as "bt". "bt" is probably what you think of as 
> "stack". The intrinsic dbx command might be "whereami", I'm afraid I use 
> it with a mixture of dbx and gdb commands.
> To find an FPE error you probably want to turn the signal handling 
> functions off, run the code, get a core file. Load the core file, and 
> find out which line you are on (bt or whereami) - hence which line is 
> dividing by zero[1].
> Thanks,
> Allan
> [1] Floating point exceptions are always division by zero :).
> _______________________________________________
> Scottish mailing list
> Scottish at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/scottish
This email and any accompanying files are confidential.      If you are
not  the  intended recipient  you  must not use,  copy or disclose the
content.   If you have received this email in error please contact the 
sender by return email and delete this message. 
Thankyou for your co-operation.

More information about the Scottish mailing list