From: Keith Seitz <keiths@redhat.com>
To: Hui Zhu <teawater@gmail.com>
Cc: insight@sources.redhat.com
Subject: Re: undefined reference to `set_breakpoint'
Date: Wed, 31 Mar 2010 03:20:00 -0000 [thread overview]
Message-ID: <4BB22B62.3050402@redhat.com> (raw)
In-Reply-To: <daef60381003300129w7e84cb24kc0881e67211a9106@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
On 03/30/2010 01:29 AM, Hui Zhu wrote:
> Ping. Did I miss something?
>
Nope -- I did. After the breakpoint commands API was fiddled with, I
worked up the original patch. Some (brief) time after committing my
patch, the API was fiddled with again.
I apologize about the confusion. Try this patch, which I've committed.
Keith
ChangeLog
2010-03-30 Keith Seitz <keiths@redhat.com>
* generic/gdbtk-bp.c (gdb_get_breakpoint_info): Breakpoint
commands are now reference counted. Adjust data pointers.
(gdb_get_tracepoint_info): Likewise.
(gdb_actions_command): Don't free previous actions. If the
commands aren't valid, we would prefer to keep the old ones
any way. break_point_set_commands will also clobber any
previous results anyway.
[-- Attachment #2: more-bp-cmd-fixes.patch --]
[-- Type: text/plain, Size: 1678 bytes --]
Index: generic/gdbtk-bp.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-bp.c,v
retrieving revision 1.34
diff -u -p -r1.34 gdbtk-bp.c
--- generic/gdbtk-bp.c 24 Mar 2010 20:18:28 -0000 1.34
+++ generic/gdbtk-bp.c 30 Mar 2010 16:45:30 -0000
@@ -362,7 +362,7 @@ gdb_get_breakpoint_info (ClientData clie
Tcl_NewIntObj (b->ignore_count));
Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- get_breakpoint_commands (b->commands));
+ get_breakpoint_commands (b->commands ? b->commands->commands : NULL));
Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
Tcl_NewStringObj (b->cond_string, -1));
@@ -684,9 +684,6 @@ gdb_actions_command (ClientData clientDa
return TCL_ERROR;
}
- /* Free any existing actions. */
- free_command_lines (&tp->commands);
-
/* Validate and set new tracepoint actions. */
Tcl_ListObjGetElements (interp, objv[2], &gdbtk_obj_array_cnt,
&gdbtk_obj_array);
@@ -773,12 +770,15 @@ gdb_get_tracepoint_info (ClientData clie
/* Append a list of actions */
action_list = Tcl_NewObj ();
- for (cl = tp->commands; cl != NULL; cl = cl->next)
+ if (tp->commands != NULL)
{
- Tcl_ListObjAppendElement (interp, action_list,
- Tcl_NewStringObj (cl->line, -1));
+ for (cl = tp->commands->commands; cl != NULL; cl = cl->next)
+ {
+ Tcl_ListObjAppendElement (interp, action_list,
+ Tcl_NewStringObj (cl->line, -1));
+ }
+ Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, action_list);
}
- Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, action_list);
return TCL_OK;
}
next prev parent reply other threads:[~2010-03-30 16:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 17:34 Gene Smith
2010-03-17 17:57 ` Tom Tromey
2010-03-18 3:39 ` Keith Seitz
2010-03-18 4:58 ` Gene Smith
2010-03-19 4:32 ` Gene Smith
2010-03-20 5:33 ` Hui Zhu
2010-03-30 8:29 ` Hui Zhu
2010-03-30 16:48 ` Hui Zhu
2010-03-31 3:20 ` Keith Seitz [this message]
2010-03-31 4:12 ` Hui Zhu
2010-03-31 4:28 ` Keith Seitz
2010-03-31 5:33 ` Hui Zhu
2010-03-31 5:37 ` Keith Seitz
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=4BB22B62.3050402@redhat.com \
--to=keiths@redhat.com \
--cc=insight@sources.redhat.com \
--cc=teawater@gmail.com \
/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: link
Be 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).