* [PATCH] get_frame_name API update
@ 2013-06-05 20:31 Keith Seitz
0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2013-06-05 20:31 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
Hi,
A little while ago, I addressed some dangling cleanup issues with
get_frame_name by tweaking the API -- the return frame name is now
malloc'd, and it is up to the caller to free the memory. The attached
patch updates insight.
With this patch, insight can once again be built, but there are still
problems. The register window is having some crashing issues which I
have yet to investigate.
Keith
ChangeLog
2013-06-05 Keith Seitz <keiths@redhat.com>
* generic/gdbtk-stack.c (get_frame_name): Change type of 'funname'
to char * to follow recent API updates in gdb.
Free 'funname' after appending it to the list.
Remove check for NULL funname in a branch where it could only
ever be NULL.
[-- Attachment #2: get_frame_name.patch --]
[-- Type: text/x-patch, Size: 1026 bytes --]
Index: generic/gdbtk-stack.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-stack.c,v
retrieving revision 1.41
diff -u -p -r1.41 gdbtk-stack.c
--- generic/gdbtk-stack.c 25 May 2012 11:36:08 -0000 1.41
+++ generic/gdbtk-stack.c 5 Jun 2013 19:08:40 -0000
@@ -1,5 +1,5 @@
/* Tcl/Tk command definitions for Insight - Stack.
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -524,7 +524,7 @@ static void
get_frame_name (Tcl_Interp *interp, Tcl_Obj *list, struct frame_info *fi)
{
struct symbol *func = NULL;
- const char *funname = NULL;
+ char *funname = NULL;
enum language funlang = language_unknown;
Tcl_Obj *objv[1];
@@ -553,6 +553,7 @@ get_frame_name (Tcl_Interp *interp, Tcl_
{
objv[0] = Tcl_NewStringObj (funname, -1);
Tcl_ListObjAppendElement (interp, list, objv[0]);
+ xfree (funname);
}
else
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-05 20:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-05 20:31 [PATCH] get_frame_name API update Keith Seitz
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).