public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "mnemo at minimum dot se" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug backtrace/9829] New: add switch/param to make bt/backtrace print name of binary for each frame Date: Mon, 09 Feb 2009 13:12:00 -0000 [thread overview] Message-ID: <20090209131249.9829.mnemo@minimum.se> (raw) When there is no symbols gdb prints backtraces as "f() in blah.so" for exported symbols and "?? in blah.so" for non-exported symbols (I think). Anyway, once I have symbols it instead prints "f() at utils.c:42" which is great, however, often I still want the name of the binary that holds this function. A pretty common use case for me is to find a SEGV in some random complex program on Ubuntu (a program that I use a lot but that I don't do development on) and I run it in gdb and I find a backtrace that runs through several libraries. For example, "evolution" calling into "libmailstuff" which calls into "glib". Often I can guess where the bug is based on the backtrace (for example I know the bug is probably not in malloc() inside glibc and usually not in glib either). So basically my next step is to look at the code for the function above malloc() or whatever in the backtrace. Suppose the frame I find interesting is inside a library which has symbols installed so it's is printed like this "f() at utils.c:42". Now I have no way of knowing what package I should "apt-get source PKG" to find the yadayada.c file. If gdb instead printed "f() at utils.c:42 from some_binary.so" then I could just do "dpkg -S some_binary.so" and quickly I would directly know where to continue my investigation. Basically I think there is an implicit assumption that gdb is only used to debug programs that you wrote yourself (and hence you'd know what libraries are linked and which functions goes into what library etc) but honestly I think gdb is being used a lot today by people who don't really have this type of info. In particular all the automatic crash reports in ubuntu have stacks generated by gdb and the people triaging these bugs almost certain don't have detailed info about each program bugs are found inside. So, please can you add some switch/parameter to the "bt" command so that it also prints the name of the binary? -- Summary: add switch/param to make bt/backtrace print name of binary for each frame Product: gdb Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: backtrace AssignedTo: unassigned at sourceware dot org ReportedBy: mnemo at minimum dot se CC: gdb-prs at sourceware dot org http://sourceware.org/bugzilla/show_bug.cgi?id=9829 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next reply other threads:[~2009-02-09 13:12 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-02-09 13:12 mnemo at minimum dot se [this message] 2009-02-09 15:05 ` [Bug backtrace/9829] " mnemo at minimum dot se
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=20090209131249.9829.mnemo@minimum.se \ --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).