This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix that different function breakpoints are set at same pc address (PR gdb/12703)
- From: Yao Qi <yao at codesourcery dot com>
- To: Terry Guo <terry dot guo at arm dot com>
- Cc: gdb-patches at sourceware dot org, pedro at codesourcery dot com
- Date: Wed, 29 Jun 2011 16:00:07 +0800
- Subject: Re: [PATCH] Fix that different function breakpoints are set at same pc address (PR gdb/12703)
- References: <000901cc34bc$fd1aa6a0$f74ff3e0$@guo@arm.com> <000101cc35fb$8d45ff60$a7d1fe20$@guo@arm.com> <4E0AB9B3.8060104@codesourcery.com> <000501cc362a$2e7f9020$8b7eb060$@guo@arm.com>
On 06/29/2011 03:00 PM, Terry Guo wrote:
> Hi,
>
> Here is my case. As for stack backtrace, I wonder whether it works for the function that only contains one single instruction and function that doesn't even has a valid prologue. I also saw that current prologue analyzer cannot handle all cases, so I try to avoid this in a more general way.
>
> register unsigned long guard asm("r5");
>
> void bar (void);
> void test (void) __attribute__((naked));
attribute naked on the ARM, AVR, MCORE, RX and SPU ports indicates that
the specified function does not need prologue/epilogue sequences
generated by the compiler, so there is no prologue in function test. Of
course, prologue analyzer can't help here.
However, this test case is not a correct program, because code after
"test" is unknown. If you put correct epilogue in "test" to make it
either return to main, or jump to bar, prologue analyzer can handle it
correctly.
Looks this test case is invalid. We have to find a valid/correct case
to show gdb's bug on setting breakpoint, and your patch could fix this bug.
--
Yao (éå)