This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using STL containers with GDB


On Wed, Apr 23, 2008 at 08:54:58PM +1200, Nick Roberts wrote:
>  > You are right, this patch is very hardcoded. I assume that fields of  
>  > STL containers are always in the same order. I ask GDB the size of  
>  > "void *", and I compute fields offsets using this information to read  
>  > things I need. If you use another compiler, but with GNU STL headers,  
>  > this patch *should* continue to work...
> 
> Thar's what I wonder: would your approach, implemented as a Python script,
> give the best of both worlds?

If you're talking about another compiler, in what way is this better
than doing it by field name?

If you're using the GNU STL, you'll get the same field names and class
layout regardless of the compiler.  If you're not, then both the field
names and class layout will be different.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]