This is the mail archive of the gdb@sources.redhat.com 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: dynamic scope from frame, static scope from ???


Andrew Cagney <cagney@gnu.org> writes:
> True.  Per: Can't use [some] macro's in conditional breakpoints
> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=856
> GDB currently gets this wrong :-(

Yep.  parse_exp_1 should take a sal, not a block, and
expression_context_pc should have been expression_context_sal.  (I've
added a note to the PR.)

> The "frame" gives us a path to this information is when the program is
> running.  I'm asking what should should be used to give us that
> information when the program isn't running?

Actually, now that I look at it, what's wrong with 'struct
symtab_and_line' for a static context?  You can get a block from that
with block_for_pc_sect (sal.pc, sal.section).  (There should be a
function, block_for_sal, which does that.)


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