This is the mail archive of the gdb-patches@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: [patch] [ia64] Fix (#2) shadowing of breakpoints [testcase fixup]


> gdb/
> 2009-09-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	Fix ia64 shadowing of breakpoints in multiple slots of a single bundle.
> 	* ia64-tdep.c (ia64_memory_insert_breakpoint): New call
> 	of make_show_memory_breakpoints_cleanup with parameter 0.  Move the
> 	reading of SHADOW_CONTENTS to this memory state point of code.

Patch is approved. I had a hard time understanding what was going on
(relatively speaking), but eventually got it. Perhaps a little comment
updated as suggested below might help; your call.

> gdb/testsuite/
> 2009-09-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* gdb.base/breakpoint-shadow.exp (Second breakpoint placed): Initialize
> 	$bpt2address.
> 	(Second breakpoint address is valid on ia64)
> 	(ia64 breakpoint in the Second breakpoint bundle): New.

Approved as well :).

>    /* Disable the automatic memory restoration from breakpoints while
>       we read our instruction bundle.  Otherwise, the general restoration
>       mechanism kicks in and we would possibly remove parts of the adjacent
>       placed breakpoints.  It is due to our SHADOW_CONTENTS overlapping the real

This is where I think it would be worth explaining that we are *re*
reading the bundle except that, this time, we are reading it in order
to compute the new bundle inside which we'll be inserting the
breakpoint. Therefore, we have to disable the automatic memory
restoration, bla bla bla.

> +if [istarget "ia64-*-*"] then {
> +    # Unoptimized code should not use the 3rd slot for the first instruction of
> +    # a source line.

This is important for our test, because we want both breakpoints
(break-first and break-second) to be in the same bundle.

-- 
Joel


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