All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: xenomai@xenomai.org
Subject: [Xenomai-core] GDB 6.x + simulator
Date: Sun, 09 Apr 2006 19:17:23 +0200	[thread overview]
Message-ID: <443941A3.20909@domain.hid> (raw)


The following patch enables GDB 6.x for the simulator. Please give this
a try if you happen to use the Xenosim. TIA,

--- sim/scope/gdbhelper.cc	(revision 904)
+++ sim/scope/gdbhelper.cc	(working copy)
@@ -423,6 +423,8 @@

      char *ibuf = gdb_ibuf.gets(), *estart = gdb_ibuf.gets();

+    Tcl_ResetResult(tclInterp);
+
      for (;;)
  	{
  	if (*ibuf == '\0' || *ibuf == '\n')
@@ -504,7 +506,7 @@
  		// the contents of the log did not match anything known to
  		// the caller. We cannot return -1, which value is reserved
  		// to indicate that the connection with GDB has been lost.
-		
+
  		Tcl_AppendElement(tclInterp,CString(rc2 ? rc2 : nre).gets());
  		Tcl_AppendElement(tclInterp,matched);
  		Tcl_AppendElement(tclInterp,Tcl_DStringValue(&gdb_ilog));
Index: sim/scope/tcl/gdb.tcl
===================================================================
--- sim/scope/tcl/gdb.tcl	(revision 904)
+++ sim/scope/tcl/gdb.tcl	(working copy)
@@ -850,8 +850,10 @@
  	regexp "\[^\"\]+.(\[^\"\]+).*" $matched mvar curfocus
      }

-    # query stack information
-    set rl [gdb:command where ls]
+    # query stack information -- auto-limit to the inner last 32
+    # frames in order to work-around the issue GDB 6.x has with
+    # ucontext(2) driven co-routines.
+    set rl [gdb:command "where 32" ls]
      set stackinfo [lindex $rl 2]

      if {$stackinfo == {}} {

-- 

Philippe.


             reply	other threads:[~2006-04-09 17:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-09 17:17 Philippe Gerum [this message]
2006-04-09 20:04 ` [Xenomai-core] GDB 6.x + simulator Bruno Rouchouse

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=443941A3.20909@domain.hid \
    --to=rpm@xenomai.org \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.