Bug 425026 - who_points_at should report the field in the object that does the pointing
Summary: who_points_at should report the field in the object that does the pointing
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (other bugs)
Version First Reported In: unspecified
Platform: Other Other
: NOR minor
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-05 07:59 UTC by Noel Grandin
Modified: 2020-08-05 07:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noel Grandin 2020-08-05 07:59:28 UTC
Assuming we have debug information, it would be nice if the

    (gdb) monitor who_points_at 0xsomething

command, could dig into the gdb typeinfo and report which field contains the pointer value.

If that turns out to be too hard, a good second-option solution would be adding an extra option

    (gdb) monitor who_points_at 0xsomething print

which 
(a) calculates the start address of the containing object
(b) finds out the type of the containting object (valgrind seems to know this already)
(c) calls
    (gdb) print *(T *)0xsourceobject

which will make gdb print out the whole containing object.

Thanks