This is the mail archive of the
mailing list for the Insight project.
[PATCH/gdbtk] Update stackwin gdb api usage
- From: Roland Schwingel <roland at onevision dot com>
- To: insight at sourceware dot org
- Date: Mon, 02 Apr 2012 17:21:22 +0200
- Subject: [PATCH/gdbtk] Update stackwin gdb api usage
Here is a new patch from my side for insight. It adresses 2 issues.
The small one first:
In the tcl code of the stackwindow there is an instance variable
maxwidth which is calculated but never used somewhere. My patch dares to
The bigger one:
I am frequently seeing output in insight on windows 64 bit:
(Internal error: pc 0x0 in read in psymtab, but not in symtab.)
Especially when debugging objectiveC code but can also see in sometimes
when debugging plain c. This is triggered by stack unwinding (showing
stack window in insight). I tracked it down to 2 problems. One of it is
in insight itself and fixed with this patch.
The C code of insight dealing with the backtrace generation was made
somewhere in 2001 and remainded largely unchanged since then. It was
initially "inspired" by the code directly in gdb. GDB has changed since
then in that area. I updated insight's C code for generating the
backtrace for the tcl part to match again gdb's code in stack.c. I could
remove a bigger bunch of insight's private code in that area and replace
it directly with a call to find_frame_funname() of gdb itself. I also
removed some dead code here.
From what I could see now insight no longer genarates this error
message directly. I could still trigger it in some situations by just
issuing a "bt" from either insight's console or from within native gdb.
I have to dive into that. But with this patch insight itself should be
clean now in this regard.
I also updated copyright informations in the affected files.
2012-04-02 Roland Schwingel <firstname.lastname@example.org>
* generic/gdbtk-stack.c: Updated copyright informations.
include "stack.h" and "solib.h" (when needed).
(gdb_stack): Some reformatting.
(get_frame_name): Updated usage of gdb api for
backtrace generation. Some reformatting. Removed
dead code. Also handle frame type ARCH_FRAME now.
* library/stackwin.it[bh]: Remove dead instance
variable maxwidth. Updated copyright informations.
A general question:
The direction of stack dump in insight is opposite to when issueing a
backtrace inside gdb itself. Is this on purpose? Wouldn't it be nicer
when insight's stack window would show the stack in the same order?
Any comments? Is this ok?
Description: Text document