* [Xenomai-core] GDB 6.x + simulator
@ 2006-04-09 17:17 Philippe Gerum
2006-04-09 20:04 ` Bruno Rouchouse
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Gerum @ 2006-04-09 17:17 UTC (permalink / raw)
To: xenomai
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-core] GDB 6.x + simulator
2006-04-09 17:17 [Xenomai-core] GDB 6.x + simulator Philippe Gerum
@ 2006-04-09 20:04 ` Bruno Rouchouse
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Rouchouse @ 2006-04-09 20:04 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 1931 bytes --]
Works fine here now with gdb 6.3 and svn trunk version.
Thanks !
--
Bruno
On 4/9/06, Philippe Gerum <rpm@xenomai.org> wrote:
>
>
> 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@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
>
[-- Attachment #2: Type: text/html, Size: 3395 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-09 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-09 17:17 [Xenomai-core] GDB 6.x + simulator Philippe Gerum
2006-04-09 20:04 ` Bruno Rouchouse
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.