From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Alexandre Oliva Cc: gdb-patches@sourceware.cygnus.com Subject: Re: ARM frame fp is not always FP_REGNUM Date: Tue, 04 Jul 2000 00:29:00 -0000 Message-id: <39619215.E49230D9@cygnus.com> References: <39617827.29D15730@cygnus.com> X-SW-Source: 2000-07/msg00030.html Alexandre Oliva wrote: > > On Jul 4, 2000, Andrew Cagney wrote: > > > FP_REGNUM refers to GDB's internal frame-handle / frame-pointer / > > frame-base variable. > > On ARM, it's register 11, which is a real register. But SP_REGNUM is > register 13. Then, when framereg == 13 in EXTRA_FRAME_INFO, `info > regs' will display the value of r13 for r11, and the actual value of > r11 cannot be obtained. How does this compare to when you do an info registers when at the inner most frame? Hmm, I remember reading something about this in the doco recently. Check: http://sourceware.cygnus.com/gdb/onlinedocs/gdb_9.html#SEC60 @value{GDBN} has four ``standard'' register names that are available (in expressions) on most machines---whenever they do not conflict with an architecture's canonical mnemonics for registers. The register names @code{$pc} and @code{$sp} are used for the program counter register and the stack pointer. @code{$fp} is used for a register that contains a pointer to the current stack frame, and @code{$ps} is used for a register that contains the processor status. For example, you could print the program counter in hex with This suggests that providing the ``$fp'' pseudo register is wrong for this target. Andrew >From ac131313@cygnus.com Tue Jul 04 00:31:00 2000 From: Andrew Cagney To: Alexandre Oliva Cc: gdb-patches@sourceware.cygnus.com Subject: Re: StrongARM: str stores different PC Date: Tue, 04 Jul 2000 00:31:00 -0000 Message-id: <39619281.DDECCB6C@cygnus.com> References: X-SW-Source: 2000-07/msg00031.html Content-length: 72 Just one BTW, use sim_io_eprintf (....) for the error/warning. Andrew >From aoliva@redhat.com Tue Jul 04 00:44:00 2000 From: Alexandre Oliva To: Andrew Cagney Cc: gdb-patches@sourceware.cygnus.com Subject: Re: ARM frame fp is not always FP_REGNUM Date: Tue, 04 Jul 2000 00:44:00 -0000 Message-id: References: <39617827.29D15730@cygnus.com> <39619215.E49230D9@cygnus.com> X-SW-Source: 2000-07/msg00032.html Content-length: 1173 On Jul 4, 2000, Andrew Cagney wrote: > Alexandre Oliva wrote: >> On ARM, it's register 11, which is a real register. But SP_REGNUM is >> register 13. Then, when framereg == 13 in EXTRA_FRAME_INFO, `info >> regs' will display the value of r13 for r11, and the actual value of >> r11 cannot be obtained. > How does this compare to when you do an info registers when at the inner > most frame? That's exactly the case. Given this sample assembly program: .global _start _start: mov r11, #1 After executing the first instruction, GDB will print: (gdb) info reg [...] r11 0x800 2048 r12 0x0 0 sp 0x800 2048 [...] (gdb) p $fp $1 = 1 > This suggests that providing the ``$fp'' pseudo register is wrong for > this target. Or that, on ARM, $fp should obtain the value of frame->framereg, instead of FP_REGNUM. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist *Please* write to mailing lists, not to me