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: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Yao Qi <yao at codesourcery dot com>
- Date: Fri, 24 Jun 2011 09:59:08 +0100
- Subject: Re: [PATCH] Fix that different function breakpoints are set at same pc address (PR gdb/12703)
- References: <000001cc3216$b96ba290$2c42e7b0$@guo@arm.com> <4E040A9A.5020807@codesourcery.com>
On Friday 24 June 2011 04:55:06, Yao Qi wrote:
> On 06/24/2011 10:30 AM, Terry Guo wrote:
>
> IMO, this is a target-specific bug, so this PR's component should be
> tdept, so it should be "PR tdept/12703" instead of "PR gdb/12703".
>
> I'd move your test cases break-function.{c,exp} to gdb.arch/ dir,
> because it is target-dependent fix. I am sure this case is useful to
> other ports.
The testcase might help catch the same issue in other archs.
IMO, it should stay generic if possible.
I agree with Yao when he says in the PR that there seems to be
some other root cause for the bug. Shouldn't
thumb_instruction_changes_pc have caught that "b.n" ?
00008160 <fault_isr>:
8160: e7fe b.n 8160 <fault_isr>
...
00008164 <reset_isr>:
8164: 4a05 ldr r2, [pc, #20] ; (817c <reset_isr+0x18>)
> > +void foo(void)
>
> This doesn't comply to GNU coding standard. Please move "foo ()" to
> next line.
Note that test code does not strictly _need_ to follow the
coding standards. Though it's indeed nice when it does.
GDB should be able to debug non-GNU code too. :-)
--
Pedro Alves