robert@spam.istc.sri.com (08/30/88)
Does anyone else use "cdb", HPs `debugger', on the HP9000/300? This is the somewhat symbolic-level debugger provided in lieu of the (superior) dbx or sdb. I'm wondering (among other things) why a stack trace (`t' command) shows that all functions other than those declared within the program being debugged take 5 paramaters. I have routines I've written and made into a library being shown as having 5 paramaters, when I know they have less than that. Is this a bug or a feature? -------------------------------------------------------------------------- Robert Allen, robert@spam.istc.sri.com, 415-859-2143 (work phone, days) --------------------------------------------------------------------------
nathanm@hpcvlx.HP.COM (Nathan K. Meyers) (09/29/88)
> I'm wondering (among other things) why a stack trace (`t' command) > shows that all functions other than those declared within the program > being debugged take 5 paramaters. I have routines I've written and > made into a library being shown as having 5 paramaters, when I know > they have less than that. Is this a bug or a feature? A feature. If cdb doesn't have the debugging information on a routine, it defaults to showing 5 parameters. There's nothing in C to identify at run time how much of the stack is devoted to arguments or what type the arguments are, so cdb just shows you the top 5 integers on the stack. If you want, you can put debuggable code into libraries. The ar(1) utility works just as well on object files compiled with the -g option as on any other -- the result will be a much bigger library, of course. You will then get meaningful stack trace information for the library files (whether or not cdb finds the library sources). Nathan Meyers nathanm@hp-pcd.hp.com