From: Denis PILAT <denis.pilat@st.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: [RFC] -thread-select double print stack frame
Date: Mon, 19 Mar 2007 13:48:00 -0000 [thread overview]
Message-ID: <45FE948B.9090007@st.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 904 bytes --]
Following discussion with Nick
(http://sources.redhat.com/ml/gdb-patches/2007-03/msg00156.html),
about mi output of -thread-info new command,
here is a patch that fix a problem with *-thread-select* that double
print the stack frame.
Example:
-thread-select 1
^done,new-thread-id="1",frame={level="0",func="done_making_threads",args=[],file="/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/cvs/head/src/gdb/testsuite/gdb.mi/pthreads.c",fullname="/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/cvs/head/src/gdb/testsuite/gdb.mi/pthreads.c",line="61"},line="61",file="/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/cvs/head/src/gdb/testsuite/gdb.mi/pthreads.c"
(gdb)
As noticed by Nick, this "double printing" is not documented neither
tested. I propose to remove it, it does not involved any regression in
the testsuite( done for linux native target).
--
Denis
[-- Attachment #2: thread-select.patch --]
[-- Type: text/plain, Size: 875 bytes --]
2007-03-19 Denis Pilat <denis.pilat@st.com>
* thread.c (do_captured_thread_select): print_stack_frame use
LOC_AND_ADDRESS for mi output.
Index: thread.c
===================================================================
RCS file: /cvs/src/src/gdb/thread.c,v
retrieving revision 1.51
diff -u -p -r1.51 thread.c
--- thread.c 28 Feb 2007 17:35:01 -0000 1.51
+++ thread.c 19 Mar 2007 13:27:53 -0000
@@ -700,7 +700,12 @@ do_captured_thread_select (struct ui_out
ui_out_text (uiout, target_tid_to_str (inferior_ptid));
ui_out_text (uiout, ")]");
- print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC);
+ /* For mi, we just print location. */
+ if (ui_out_is_mi_like_p (uiout))
+ print_stack_frame (get_selected_frame (NULL), 1, LOC_AND_ADDRESS);
+ else
+ print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC);
+
return GDB_RC_OK;
}
next reply other threads:[~2007-03-19 13:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 13:48 Denis PILAT [this message]
2007-03-20 0:57 ` Nick Roberts
2007-03-26 13:19 ` Denis PILAT
2007-03-27 19:33 ` Daniel Jacobowitz
2007-03-27 21:42 ` Nick Roberts
2007-03-28 2:11 ` Daniel Jacobowitz
2007-03-28 5:56 ` Nick Roberts
2007-03-28 8:26 ` Denis PILAT
2007-03-28 11:43 ` Daniel Jacobowitz
2007-03-29 7:45 ` Denis PILAT
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=45FE948B.9090007@st.com \
--to=denis.pilat@st.com \
--cc=gdb-patches@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: 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