[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging n
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work |
Date: |
Tue, 6 Mar 2018 15:20:44 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #53241 (project octave):
Status: Ready For Test => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #12:
Things seem to work now so I will close this bug report.
However, there are still little oddities. When using show-octave-dbstack, the
output appears not in the window running gdb, but back in the terminal window
that is running the Octave process being debugged. Also, the indicator that
shows which function is active in the stack trace is off by one. This could
potentially lead to debugging errors. For example, I used this test script
blah.m
function blah ()
subfunc1 ();
endfunction
function subfunc1 ()
subfunc2 ();
endfunction
function subfunc2 ()
x = magic (3);
y = x ^ 2;
endfunction
I then set a breakpoint in gdb at xpow.cc:204. When I execute blah() in
Octave, and then show-octave-dbstack in gdb, I get
stopped in:
blah>subfunc2 at line 11
[/home/rik/wip/Projects_Mine/octave-dbg/blah.m]
--> blah>subfunc1 at line 6 [/home/rik/wip/Projects_Mine/octave-dbg/blah.m]
blah at line 2 [/home/rik/wip/Projects_Mine/octave-dbg/blah.m]
This is another small niggle, but the reference count on an array object is
shown twice. Here is the array "magic (3)" displayed with the macro
display-dense-array:
array object: (const Matrix &) @0x7ffeb39ebe90: {<NDArray> = {<MArray<double>>
= {<Array<double>> = {_vptr.Array = 0x7f0fd1f639b0 <vtable for Matrix+16>,
dimensions = {
rep = 0x2197880}, rep = 0x1e689c0, slice_data = 0x2252c20,
slice_len = 9}, <No data fields>}, <No data fields>}, <No data
fields>}
dimensions:
ndims: 2
dims: {3, 3}
rep = {data = 0x2252c20, len = 9, count = {count = 2}}
rep.data = {8, 3, 4, 1, 5, 9, 6, 7, 2}
We could change the macro to actually print &rep.data, rep.len, and
rep.count.count to avoid this rather than, the admittedly easy:
output *$arg0.rep
The macro for display-sparse-array works, but seems awkward. This is the
display of "sparse (magic (3))"
sparse object: (const SparseMatrix &) @0x7ffeb39ebe90: {<MSparse<double>> =
{<Sparse<double>> = {_vptr.Sparse = 0x7f0fd1f63890 <vtable for
SparseMatrix+16>, rep = 0x20e92e0,
dimensions = {rep = 0x2254780}}, <No data fields>}, <No data fields>}
dimensions.rep[0] = ndims: 2
dims: {3, 3}
dimensions.rep[1] = 3
rep = {d = 0x20796a0, r = 0x2101e60, c = 0x2279b00, nzmx = 9, nrows = 3, ncols
= 3,
count = {count = 2}}
rep.d = {8, 3, 4, 1, 5, 9, 6, 7, 2}
rep.r = {0, 1, 2, 0, 1, 2, 0, 1, 2}
rep.c = {0, 3, 6, 9}
It seems like the macro could just print "dimensions:\n" as the dense array
macro does followed by display-dims.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53241>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, John W. Eaton, 2018/03/06
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, John W. Eaton, 2018/03/06
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, Dan Sebald, 2018/03/06
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, Dan Sebald, 2018/03/06
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, John W. Eaton, 2018/03/06
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, Dan Sebald, 2018/03/06
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work,
Rik <=
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, John W. Eaton, 2018/03/06
- [Octave-bug-tracker] [bug #53241] .gdbinit macros for Octave debugging no longer work, Dan Sebald, 2018/03/06