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: Invalid registers


On Wed, 13 Jul 2005 16:42:07 +0100, Daniel Jacobowitz <drow@false.org> wrote:

On Wed, Jul 13, 2005 at 03:44:10PM +0100, Andrew STUBBS wrote:
With this function I get different wrong behaviour. Now I get all but PC
and R15 (stack pointer) as '*value not available*'. I had expected that
that the CFI would override the initialised values because it knows best
(just because it is called 'init', not 'set), but neither R14 nor PR have
their true values listed despite execute_cfa_program extracting a 'how'
value of DWARF2_FRAME_REG_SAVED_OFFSET. Clearly this is not the case, but
should it be?

Why isn't it? Please debug this, since reading the code clearly suggests it works as you expect. See dwarf2_frame_cache.

I think I have found the 'problem'.


It is working as it should, but it doesn't look like it at first sight. When I set a breakpoint on a function it breaks _before_ the callee save registers have been saved (this may be a mistake, I'm not sure yet). If I step into the function a little more then the CFI kicks in and it overrides the initial settings I put in.

What confused my is that there is more than one frame available at once (of course), and when debugging it is not always clear which one I am looking at, especially when it is typically the same set of registers being saved.

Thank you for all your help. Apologies for being thick.

Now onto the next issue ....

Andrew Stubbs


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