[PATCH] Gracefully handle not being able to access a DWARF register number
Matthew Gretton-Dann
matthew.gretton-dann@arm.com
Tue Apr 27 10:54:00 GMT 2010
On Mon, 2010-04-26 at 14:06 -0600, Tom Tromey wrote:
> >>>>> "Matthew" == Matthew Gretton-Dann <matthew.gretton-dann@arm.com> writes:
>
> Matthew> The attached patch changes these internal errors into warnings, and
> Matthew> tries to return something sensible to the user.
>
> Why a warning and not an error?
>
> It seems to me that an error is preferable to returning incorrect
> information.
Agreed.
> Matthew> Please could someone review and comment on the patch, and then if this
> Matthew> is approved can they please commit it as I don't have commit rights.
>
> Do you have copyright assignment paperwork in place?
Yes - through my employer (ARM).
> Matthew> + warning (_("Unable to access DWARF register number %" BFD_VMA_FMT "d"),
> Matthew> + p->v.expr.value);
>
> I think there is some other way to print a CORE_ADDR, but I forget what
> it is. BFD_VMA_FMT seems suspect, just because it is not used anywhere
> else in gdb.
Okay.
Please find attached an updated patch that addresses the above two
issues.
Proposed ChangeLog:
2010-04-27 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* dwarf2loc.c (read_pieced_value, write_pieced_value,
dwarf2_evaluate_loc_desc): Handle not being able to access DWARF
registers gracefully.
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer - Tools, PD Software
ARM Limited
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1004-gdb-dwarf2loc.patch
Type: text/x-patch
Size: 2100 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100427/c4e038e1/attachment.bin>
More information about the Gdb-patches
mailing list