From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12311 invoked by alias); 9 Feb 2009 13:12:50 -0000 Received: (qmail 12297 invoked by uid 48); 9 Feb 2009 13:12:50 -0000 Date: Mon, 09 Feb 2009 13:12:00 -0000 From: "mnemo at minimum dot se" To: gdb-prs@sourceware.org Message-ID: <20090209131249.9829.mnemo@minimum.se> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug backtrace/9829] New: add switch/param to make bt/backtrace print name of binary for each frame X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00259.txt.bz2 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.