This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] More C++ static fields for tracepoints
- From: Tom Tromey <tromey at redhat dot com>
- To: Stan Shebs <stan at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 18 Mar 2010 10:32:06 -0600
- Subject: Re: [PATCH] More C++ static fields for tracepoints
- References: <4BA15504.9020707@codesourcery.com>
- Reply-to: tromey at redhat dot com
>>>>> "Stan" == Stan Shebs <stan@codesourcery.com> writes:
Stan> This patch solves a couple intertwined problems relating to
Stan> tracepoint collection of C++ classes with static fields. First,
Stan> it adds recognition of variables (including static fields) whose
Stan> location expressions indicate that they have been optimized out.
As ax-gdb grows I am starting to wonder whether we could unify it with
eval.c somehow.
Stan> Second, to collect an instance of a class with static fields, we
Stan> need to issue more bytecodes, since static fields are stored at
Stan> their own addresses, separately from the instance.
A static field may itself be of a type with static fields. That doesn't
seem to be handled in this code... should it be? And if so, be careful
about the case where a class refers to itself recursively via static
fields; we still have some printing bugs in this area :(
Tom