public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "plasmahh at gmx dot net" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug python/28538] Consider adding possibility to call gdb unwinder for the heavy lifting Date: Sat, 19 Feb 2022 20:32:49 +0000 [thread overview] Message-ID: <bug-28538-4717-fAWajFvV94@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28538-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28538 --- Comment #2 from Dennis Lubert <plasmahh at gmx dot net> --- I might have overlooked some functionality, but as I understand it, in the __call__ you either return nothing, which means gdb will do the full next step, or you have to provide all registers in the unwind info and return that. The nature of debugging for me often means that just a little bit is wrong, often due to memory corruption (and only very rarely due to some problem with gdb or the debug information getting things wrong).... This means that what I really want to do is say gdb "no, at that point $sp is x not y ... or $pc ... or even more rarely $rdi or something... What I did is write me a little plugin that allows me to override values for registers. If intrested, there is an example for the use at https://github.com/PlasmaHH/vdb/blob/master/doc/UNWIND.md#example (which is the core file I tried to debug once where I needed that thing) The problem here is that since I could not find another way, what I did was in a first round return None all the time but save the pending_frame information, then cause gdb to reset its registers which causes the unwinder to be called again (which has ugly side effects, which is the main reason I would like something cleaner) and then return the previously saved pending frame but replaces the manually "fixed" register values. What would help here is to basically get a readable version of the unwind_info gdb would produce if returning None from the unwinder. This would then enable me to change directly at that point things, instead of going in that roundabout way of saving a previous frame and then changing that... (hope that explains it, if not we can one day discuss it further on irc ) -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2022-02-19 20:32 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-03 15:16 [Bug python/28538] New: " plasmahh at gmx dot net 2022-02-19 16:08 ` [Bug python/28538] " tromey at sourceware dot org 2022-02-19 20:32 ` plasmahh at gmx dot net [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-28538-4717-fAWajFvV94@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).