Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* "tracepoints", "follow-fork-mode", "watch - remote"
@ 2002-01-25  2:53 Sarnath K - CTD, Chennai.
  2002-01-25 10:21 ` Daniel Jacobowitz
  2002-01-31 12:32 ` Michael Snyder
  0 siblings, 2 replies; 4+ messages in thread
From: Sarnath K - CTD, Chennai. @ 2002-01-25  2:53 UTC (permalink / raw)
  To: Pierre Muller, Sarnath K - CTD, Chennai.; +Cc: gdb

Hi,

> I didn't want to say that you should run the progream after.
> Simply comparing the address of the xbreak with
> the position of the ret instruction
> in the function disassembly is enough to
> show that you are right in saying that this
> command is buggy for i386 at least.

  Fine Pierre. You are right.
I am not sure about the pointers you gave in 
the "sources". I dont have acquaintance with 
at the source level.

And I have 3 more doubts ;)
I am running GDB 5.1, Pentium III as I had told b4.

1. This is about tracepoints.

I tried setting "tracepoints" and dumping snapshots.
But unfortunately I am not able to do it. For the
commands "tstart" and "tstop"  GDB says that
"Trace can only be run on remote targets.". so I just
"run" the program. The program executed and exited 
normally. I followed the instructions from "onlinedocs"
in http://sources.redhat.com. I am not able to dump any
snapshots. ;(

This is a snapshot of the system:

Program Source:

[root@via1 gdb]# cat trace.c
int collected_data;

int main()
{
        collected_data = 3;
        a();
}

int a()
{
        return 0;
}
[root@via1 gdb]#

Compilation:
[root@via1 gdb]# cc -g -o trace trace.c
[root@via1 gdb]#

GDB Session:

[root@via1 gdb]# ./gdb ./trace
GNU gdb 5.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) trace a
Tracepoint 1 at 0x80483b7: file trace.c, line 11.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
> collect collected_data
> end
(gdb) tstart
Trace can only be run on remote targets.
(gdb) run
Starting program: /home/via/sarnath/gdb/./trace

Program exited normally.
(gdb) tdump
Trace can only be run on remote targets.
(gdb) tfind 1
Trace can only be run on remote targets.
(gdb)

So, Can't I trace on a standalone system.
If I use "gdbserver" as on the target side,
GDB says that "target doesnt support command".
So whats the solution ? Cant "tracepoints" be
used ?

2. hardware brkpoints, hardware "watch"es are
   not supported in the GDBSERVER. Is this true ?
   or Is there any configutation option for this, which 
   I am missing ?
   (PIII machine)

3. "set follow-fork-mode" always works as if it's value
   is "parent". I am not able to debug "child" or enable
   GDB "ask" for the choice. Is this configuraion, not
   supported on x86 machines or Am I missing something.

/*
 * I am relatively new to GDB envmt. I am just
 * learning the different features.
 * So if I am using GDB in a wrong way, please
 * let me know and ignore this mail.
 */

Sarnath


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "tracepoints", "follow-fork-mode", "watch - remote"
  2002-01-25  2:53 "tracepoints", "follow-fork-mode", "watch - remote" Sarnath K - CTD, Chennai.
@ 2002-01-25 10:21 ` Daniel Jacobowitz
  2002-01-25 11:34   ` Eli Zaretskii
  2002-01-31 12:32 ` Michael Snyder
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-01-25 10:21 UTC (permalink / raw)
  To: Sarnath K - CTD, Chennai.; +Cc: Pierre Muller, gdb

On Fri, Jan 25, 2002 at 04:18:23PM +0530, Sarnath K - CTD, Chennai. wrote:
> I tried setting "tracepoints" and dumping snapshots.
> But unfortunately I am not able to do it. For the
> commands "tstart" and "tstop"  GDB says that
> "Trace can only be run on remote targets.". so I just
> "run" the program. The program executed and exited 

Only remote targets, remember?

> So, Can't I trace on a standalone system.
> If I use "gdbserver" as on the target side,
> GDB says that "target doesnt support command".
> So whats the solution ? Cant "tracepoints" be
> used ?

You need a stub supporting tracepoints.  At the moment I do not know of
any.

> 2. hardware brkpoints, hardware "watch"es are
>    not supported in the GDBSERVER. Is this true ?
>    or Is there any configutation option for this, which 
>    I am missing ?
>    (PIII machine)

That is true.  I could add them, but I need to finish the rest of my
gdbserver infrastructure work (currently on hold) first.

> 3. "set follow-fork-mode" always works as if it's value
>    is "parent". I am not able to debug "child" or enable
>    GDB "ask" for the choice. Is this configuraion, not
>    supported on x86 machines or Am I missing something.

It is not supported on Linux.  This is a documentation failure.  It
could be supported, but I haven't really wrapped my head around how to
do it yet.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "tracepoints", "follow-fork-mode", "watch - remote"
  2002-01-25 10:21 ` Daniel Jacobowitz
@ 2002-01-25 11:34   ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2002-01-25 11:34 UTC (permalink / raw)
  To: drow; +Cc: k_sarnath, muller, gdb

> Date: Fri, 25 Jan 2002 13:20:41 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
> 
> > 3. "set follow-fork-mode" always works as if it's value
> >    is "parent". I am not able to debug "child" or enable
> >    GDB "ask" for the choice. Is this configuraion, not
> >    supported on x86 machines or Am I missing something.
> 
> It is not supported on Linux.  This is a documentation failure.

If you mean that the manual should be corrected, please suggest
where and how.  Thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "tracepoints", "follow-fork-mode", "watch - remote"
  2002-01-25  2:53 "tracepoints", "follow-fork-mode", "watch - remote" Sarnath K - CTD, Chennai.
  2002-01-25 10:21 ` Daniel Jacobowitz
@ 2002-01-31 12:32 ` Michael Snyder
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2002-01-31 12:32 UTC (permalink / raw)
  To: Sarnath K - CTD, Chennai.; +Cc: Pierre Muller, gdb

"Sarnath K - CTD, Chennai." wrote:
> 
> Hi,
> 
> > I didn't want to say that you should run the progream after.
> > Simply comparing the address of the xbreak with
> > the position of the ret instruction
> > in the function disassembly is enough to
> > show that you are right in saying that this
> > command is buggy for i386 at least.

XBREAK is buggy for all targets, possibly excepting hpux.  
It should never have been added, and it will be removed 
as soon as I can find the time.

> 
>   Fine Pierre. You are right.
> I am not sure about the pointers you gave in
> the "sources". I dont have acquaintance with
> at the source level.
> 
> And I have 3 more doubts ;)
> I am running GDB 5.1, Pentium III as I had told b4.
> 
> 1. This is about tracepoints.

Tracepoints will not work unles you have a gdb stub that
supports them.

> I tried setting "tracepoints" and dumping snapshots.
> But unfortunately I am not able to do it. For the
> commands "tstart" and "tstop"  GDB says that
> "Trace can only be run on remote targets.". so I just
> "run" the program. The program executed and exited
> normally. I followed the instructions from "onlinedocs"
> in http://sources.redhat.com. I am not able to dump any
> snapshots. ;(
> 
> This is a snapshot of the system:
> 
> Program Source:
> 
> [root@via1 gdb]# cat trace.c
> int collected_data;
> 
> int main()
> {
>         collected_data = 3;
>         a();
> }
> 
> int a()
> {
>         return 0;
> }
> [root@via1 gdb]#
> 
> Compilation:
> [root@via1 gdb]# cc -g -o trace trace.c
> [root@via1 gdb]#
> 
> GDB Session:
> 
> [root@via1 gdb]# ./gdb ./trace
> GNU gdb 5.1
> Copyright 2001 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu"...
> (gdb) trace a
> Tracepoint 1 at 0x80483b7: file trace.c, line 11.
> (gdb) actions
> Enter actions for tracepoint 1, one per line.
> End with a line saying just "end".
> > collect collected_data
> > end
> (gdb) tstart
> Trace can only be run on remote targets.
> (gdb) run
> Starting program: /home/via/sarnath/gdb/./trace
> 
> Program exited normally.
> (gdb) tdump
> Trace can only be run on remote targets.
> (gdb) tfind 1
> Trace can only be run on remote targets.
> (gdb)
> 
> So, Can't I trace on a standalone system.
> If I use "gdbserver" as on the target side,
> GDB says that "target doesnt support command".
> So whats the solution ? Cant "tracepoints" be
> used ?

Not unles you have a stub that supports them.


> 2. hardware brkpoints, hardware "watch"es are
>    not supported in the GDBSERVER. Is this true ?
>    or Is there any configutation option for this, which
>    I am missing ?
>    (PIII machine)
> 
> 3. "set follow-fork-mode" always works as if it's value
>    is "parent". I am not able to debug "child" or enable
>    GDB "ask" for the choice. Is this configuraion, not
>    supported on x86 machines or Am I missing something.

Follow-fork is also a command that will not work anywhere
except possibly HPUX.


> /*
>  * I am relatively new to GDB envmt. I am just
>  * learning the different features.
>  * So if I am using GDB in a wrong way, please
>  * let me know and ignore this mail.
>  */
> 
> Sarnath


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-31 20:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-25  2:53 "tracepoints", "follow-fork-mode", "watch - remote" Sarnath K - CTD, Chennai.
2002-01-25 10:21 ` Daniel Jacobowitz
2002-01-25 11:34   ` Eli Zaretskii
2002-01-31 12:32 ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox