RE: [Scottish] debug
Hi, 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 : where up down (to move up and down the trace) print ( *) 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 wrong). Elise > -- > From: Allan Whiteford[SMTP:[EMAIL PROTECTED] > 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 > [EMAIL PROTECTED] > 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. * ___ Scottish mailing list [EMAIL PROTECTED] http://mailman.lug.org.uk/mailman/listinfo/scottish
RE: [Scottish] debug
Allan, yes, sorry, using a core file. My code 'catches' SIGFPE and a few other baddies and provokes a segmentation fault, but that's not of great use if i don't know how to use the core file ... Thanks for your tips, > -- > From: Allan Whiteford[SMTP:[EMAIL PROTECTED] > 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 > [EMAIL PROTECTED] > 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. * ___ Scottish mailing list [EMAIL PROTECTED] http://mailman.lug.org.uk/mailman/listinfo/scottish
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 [EMAIL PROTECTED] http://mailman.lug.org.uk/mailman/listinfo/scottish
[Scottish] debug
Hi, what would you say are the most useful commands for dbx ? (Unix question more than Linux maybe) - i'm trying to find a SIGFPE error in a sizeable program. The thing is, by the time i get my debugging code released (signal handler functions + -g compiling) the code might have migrated from NUMA to AIX. I'm semi-familiar with the tool 'debug', installed on NUMA. This has a great subcommand 'stack', which tells you where you are, as well as 'symbols', which tells you the value of the variables in the current frame. On this AIX machine however there's no debug, but dbx. Hope the developers amongst you can help me ... (i'm currently in the process of reading the 60-page man, so i will be able to manage eventually but hints from people who've used it are always useful) Thank you, Elise *** 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. * ___ Scottish mailing list [EMAIL PROTECTED] http://mailman.lug.org.uk/mailman/listinfo/scottish