Marc Khouzam | 1 Sep 17:37 2010
Picon

RE: Different output from -gdb-show than show


> -----Original Message-----
> From: Pedro Alves [mailto:pedro <at> codesourcery.com] 
> Sent: Tuesday, August 31, 2010 4:28 PM
> To: Marc Khouzam
> Cc: 'Michael Snyder'; 'gdb <at> sourceware.org'
> Subject: Re: Different output from -gdb-show than show
> 
> On Tuesday 31 August 2010 21:10:41, Marc Khouzam wrote:
> > > Yes.  You may want to issue an "-gdb-set exec-direction forward"
> > > upfront to clean up any stale state from a previous run/target
> > > as well... 
> > 
> > Should be new sessions every time with Eclipse (at least for now).
> > 
> > > Also, it may wreck havoc in non-stop if the target is
> > > already executing...  
> > 
> > You are right.  Thanks for pointing it out.
> > Nothing I can do in that case then?
> 
> I can't think of anything, sorry.
> 
> > > I think listing support for reverse
> > > in "-list-target-features" would be nice?
> > 
> > Definitely sounds like there should be some way to get that info.
> 
> Want to post a patch? :-) It should be a two liner addition to
> mi-main.c:mi_cmd_list_target_features, plus a similar sized mention
(Continue reading)

Engblom, Jakob | 2 Sep 08:48 2010

RE: reverse debugging implementation

> > of memory locations before they are changed. Going back one
> instruction then
> > involves rolling back the memory changes, the registers are set up
> then go
> > forward n-1 instruction to go back one.

If you go back in the gdb mailinglist, you will see that this is exactly
how Wind River Simics does its reverse execution.  Back up to a recent
checkpoint, and then reexecute forward to some point in time.  Silently
record any breakpoints, and if you are running breakpoints backwards, go
back to the checkpoint again and reexecute forward to the point in time
where the breakpoint hits.  

Works very well for a full-system simulator where the entire target
state is encapsulated and controlled.

I believe similar things have been done in the RTL simulation field in
the 1990s, but I have only anecdotal evidence.  If you have
checkpoints/snapshots and a deterministic simulator it is an "obvious"
thing to do.

/jakob

Jakob Engblom | Wind River | Technical Marketing Manager - Simics
Stockholm, Sweden
mobile +46 734 368 958 | email jakob.engblom <at> windriver.com

paawan oza | 2 Sep 11:44 2010
Picon

Re: reverse debugging implementation

Hi,

I am not sure whether that implementation will improve performance drastically 
compare to existing gdb reversible debuggin implementation.
as
does it involve 

-> stopping at every insn and find out whether insn is changing register or 
memory, and if register then record it (probably not every insn but depends on 
interval and no of memory changing insns)

-> when you want to go back, you go back n-1 and forward execution till 
current-1, that probably involves single steeping which has performance impact.

of course the record for memory is saved as we do not need to save architectural 
state at every insn, but performance !!

Regards,
Oza.

----- Original Message ----
From: "Engblom, Jakob" <Jakob.Engblom <at> windriver.com>
To: gdb <at> sourceware.org
Sent: Thu, September 2, 2010 12:18:02 PM
Subject: RE: reverse debugging implementation

> > of memory locations before they are changed. Going back one
> instruction then
> > involves rolling back the memory changes, the registers are set up
> then go
(Continue reading)

Engblom, Jakob | 2 Sep 14:52 2010

RE: reverse debugging implementation

> I am not sure whether that implementation will improve performance
> drastically
> compare to existing gdb reversible debuggin implementation.
> as
> does it involve
> 
> -> stopping at every insn and find out whether insn is changing
> register or
> memory, and if register then record it (probably not every insn but
> depends on
> interval and no of memory changing insns)

Neither. We only reexecute all the instructions, period.  No saving of
state other than at the regular checkpoints (snapshots).

> -> when you want to go back, you go back n-1 and forward execution
till
> current-1, that probably involves single steeping which has
performance
> impact.

Not really, we run the target system in JIT mode typically, only
stepping the last few instructions if that is in the middle of a
translation unit.  Note that his is using a complete target system
simulator, not at all relying on the host.  Simics can stop at a precise
point in virtual time, that is key to this exercise.

> of course the record for memory is saved as we do not need to save
> architectural
> state at every insn, but performance !!
(Continue reading)

Mathew Yeates | 2 Sep 19:29 2010
Picon

multidimensional fortran arrays

Hi
I mentioned this before but got no reply. So I have been getting the
address of the array and using "x/f".
But now I am using 4 dimensional arrays and this is getting old.

Anyone have any ideas how to fix this? print myarray(1,2) -> "so such
vec element"

-Mathew

Joel Brobecker | 3 Sep 03:28 2010

[ANNOUNCEMENT] GDB 7.2 released!

It is my pleasure to announce the release of GDB version 7.2.
Below is a copy of the associated ANNOUNCEMENT file.

On behalf of all the contributors who helped in this release,
Enjoy!

            GDB 7.2 released!

Release 7.2 of GDB, the GNU Debugger, is now available via anonymous
FTP.  GDB is a source-level debugger for Ada, C, C++, Objective-C,
Pascal and many other languages.  GDB can target (i.e., debug programs
running on) more than a dozen different processor architectures, and GDB
itself can run on most popular GNU/Linux, Unix and Microsoft Windows
variants.

You can download GDB from the GNU FTP server in the directory:

        ftp://ftp.gnu.org/gnu/gdb

The vital stats:

  Size  md5sum                            Name
  18MB  64260e6c56979ee750a01055f16091a5  gdb-7.2.tar.bz2
  24MB  950b766466bee748e554765c86b8b495  gdb-7.2.tar.gz

There is a web page for GDB at: 

        http://www.gnu.org/software/gdb/

That page includes information about GDB mailing lists (an announcement
(Continue reading)

Jan Kratochvil | 3 Sep 07:46 2010
Picon

Re: multidimensional fortran arrays

On Thu, 02 Sep 2010 19:29:07 +0200, Mathew Yeates wrote:
> I mentioned this before but got no reply. So I have been getting the
> address of the array and using "x/f".
> But now I am using 4 dimensional arrays and this is getting old.
> 
> Anyone have any ideas how to fix this? print myarray(1,2) -> "so such
> vec element"

For some reason it really does not work even for static arrays.  
program a
  integer :: v (2, 3, 4)
  v (:, :, :) = 10
  v (2, 3, 4) = 20
  v (2, 3, 4) = 20 ! line 5
end
(gdb) b 5
(gdb) r
(gdb) p v(2,3,4)
no such vector element

It works on archer-jankratochvil-vla
(gdb) p v(2,3,4)
$1 = 20
available at
	http://sourceware.org/gdb/wiki/ArcherBranchManagement
(or Fedora releases) but the support has some other problems and I should
merge it to FSF GDB soon.

Thanks,
Jan
(Continue reading)

Nicolas Sabouret | 3 Sep 11:06 2010
Picon

printing array in function

Hi all,

In the frame of a 1st-year course in C (starting in next october), we
are using a sub-set of gdb features (embedded in a geany plugin) to help
our students understand what is going on in their code.

The problem we have is that arrays passed to functions are seen as
pointers by gdb. Here is a simple example :

1:  void f(int tab[]) {
2:    tab[0] = 1;
3:  }
4:  int main() {
5:    int t[] = {-1,-1};
6:    f(t);
7:    return 0;
8:  }

$ gcc -g -o test test.c
$ gdb test
(gdb) b 6
(gdb) run
(gdb) p t       -> {-1, -1}
(gdb) s
(gdb) p tab     -> (int *) 0xbffff440

The only solution we found to display tab as an array is to use "p
*tab <at> 2", but this requires knowing the exact size of the array (2 in
this example).

(Continue reading)

Steven | 3 Sep 11:06 2010
Picon

Re: Linux Kernel GDB tracepoint module 2010-8-30 release

Dear Hui,

I encountered two issue when I use your GTP.

1) Following your HOWTO, I collect the two variables jiffies_64(global),
*file(argument), the result are as following, where you may see
jiffies_64 = 4298520928, that's OK, but the members of *file are all 0.
What's the problem? Thank you very much!
        -------------------------------------------------------------------
        (gdb) trace vfs_readdir 
        Tracepoint 3 at 0xc1175690: file fs/readdir.c, line 23.
        (gdb) actions
        Enter actions for tracepoint 3, one per line.
        End with a line saying just "end".
        > collect jiffies_64
        > collect *file
        > end
        (gdb) tstart
        (gdb) tstop
        (gdb) tfind
        #0  0xc1175691 i (file=0x0, filler=0, buf=0x0) at
        fs/readdir.c:23
        23      {
        (gdb) p jiffies_64
        $7 = 4298520928
        (gdb) p *file
        $8 = {f_u = {fu_list = {next = 0x0, prev = 0x0}, fu_rcuhead =
        {next = 0x0, func = 0}}, f_path = {mnt = 0x0, dentry = 0x0},
        f_op = 0x0, f_lock = {{ rlock = {raw_lock = {slock = 0}}}},
        f_count = {counter = 0}, f_flags = 0, f_mode = 0, f_pos = 0,
(Continue reading)

Jan Kratochvil | 3 Sep 11:15 2010
Picon

Re: printing array in function

On Fri, 03 Sep 2010 11:06:02 +0200, Nicolas Sabouret wrote:
> 1:  void f(int tab[]) {
> 2:    tab[0] = 1;
> 3:  }
> (gdb) p tab     -> (int *) 0xbffff440

I have only an idea by C++:

void f(int (&tab)[2]) {
(gdb) p tab
$1 = (int (&)[2])  <at> 0x7fffffffde50: {-1, -1}

Regards,
Jan


Gmane