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.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to