C++ Typedefs and symbol tables

Andrew STUBBS andrew.stubbs@st.com
Mon Aug 20 18:12:00 GMT 2007


Daniel Jacobowitz wrote:
> Symbols come from .debug_info and have type information.  minsyms come
> from the ELF .symtab section, and do not.

Ah, OK. How do I determine this, and how do I get it to use the proper 
symbols if it has chosen the wrong ones?

I know that the debug info contains the definition given in the source - 
at least for one example I looked at, anyway. It couldn't have arrived 
at the version given by 'info functions' without canonicalizing the 
debug info, so I assume it must be using the (already canonical) minsyms 
only.

> 2-3 typenames is not typical, in C++ programs.  It added around 30%
> time in my testing.

Oh? I'm talking about converting something like

	Int32 f(Bp,Int16)
  to
	int f(B*,short)

(where Bp is an example of a typedef), and only for parameters given to 
breakpoint commands and the like.

There's only 3 types in that (four if you count the function type), and 
breakpoint commands wouldn't come up _too_ often, so surely it couldn't 
take that much time?

Surely we are talking at cross-purposes?

Andrew



More information about the Gdb mailing list