From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31327 invoked by alias); 25 Jan 2002 10:53:26 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31270 invoked from network); 25 Jan 2002 10:53:14 -0000 Received: from unknown (HELO ganesh.ctd.hctech.com) (202.54.64.2) by sources.redhat.com with SMTP; 25 Jan 2002 10:53:14 -0000 Received: by GANESH with Internet Mail Service (5.5.2653.19) id ; Fri, 25 Jan 2002 16:16:14 +0530 Message-ID: From: "Sarnath K - CTD, Chennai." To: Pierre Muller , "Sarnath K - CTD, Chennai." Cc: gdb@sources.redhat.com Subject: "tracepoints", "follow-fork-mode", "watch - remote" Date: Fri, 25 Jan 2002 02:53:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2002-01/txt/msg00297.txt.bz2 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