This is the mail archive of the gdb@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: Symbols/blocks questions


> 1. Given 'struct block *b', is it true that
> 
>     block_for_pc (b.startaddr) == b

My guess is that this is NOT true. Two blocks could have the same
start address if one block is nested inside the other...

> 2. Uness I am mistaken, in case of lines inside templates,
> inline functions, and constructors, decode_line_1 returns 
> just one sal. (And breakpoint.c explicitly expands thsoe in
> expand_line_sal). In what cases will decode_line_1 actually
> return multiple sals? For overloaded functions? Anything else?
> Would it be sensible, eventually, to make decode_line_1
> return all locations corresponding to file:line?
> 
> 3. The code below, from Apple GDB, first calls decode_line_1
> and then checks, for each sal, if the line passed to decode_line_1
> is less then sal.line. How could this happen at all? I though that
> if I ask decode_line_1 for line 10, then either it returns sals
> for line 10, or it returns no sal at all.

Jerome Guitton had a serious look at how things are done when
decoding breakpoint locations, mostly because we wanted Ada and C++
to use the same code for multiple-location breakpoints. I'll ask him
to see there is any useful piece of information that might help answer
these questions.

-- 
Joel


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