From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18645 invoked by alias); 18 Jan 2002 11:50:21 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 18529 invoked from network); 18 Jan 2002 11:50:17 -0000 Received: from unknown (HELO smtp.serco.com) (195.50.81.243) by sources.redhat.com with SMTP; 18 Jan 2002 11:50:17 -0000 Received: from smtp.serco.com ([127.0.0.1] helo=SMTP) by smtp.serco.com with smtp (Exim 3.22 #26) id 16RXXE-0001YJ-02 for gcc-help@gcc.gnu.org; Fri, 18 Jan 2002 11:50:16 +0000 Received: from tsd.serco.com ([10.23.1.224]) by 10.23.1.226 (Norton AntiVirus for Internet Email Gateways 1.0) ; Fri, 18 Jan 2002 11:50:16 0000 (GMT) Received: from TSD-Message_Server by tsd.serco.com with Novell_GroupWise; Fri, 18 Jan 2002 11:50:16 +0000 Message-Id: X-Mailer: Novell GroupWise 5.2 Date: Fri, 18 Jan 2002 03:50:00 -0000 From: "Phil Prentice" To: gcc-help@gcc.gnu.org Subject: Help on gdb and gcc??? Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_FFA286E8.C9A8C5F3" X-SW-Source: 2002-01/txt/msg00186.txt.bz2 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_FFA286E8.C9A8C5F3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-length: 2648 Hi I was wondering if someone might be able to help me regarding some proble= ms that I am having with vxgdb (vxWorks gdb) and the gcc cross-compiler. I= am using the gcc compiler version 3.0.2 and the vxgdb version 4.13. The v= xgdb version is probably quite old now(??), but it worked fine with gcc ver= sion 1.39 ( I know pretty old too!!!!). I will look into building a more u= p to date vxgdb, but just in case there is an extra flag or something else = that I can try, I thought that I would ask the question first. I built the= cross-compiler 3.0.2 with the following flags:- ./configure --with-gnu-as --with-gnu-ld --enable-languages=3Dc --target=3Dm= 68k-wrs-vxworks=20=20 --with-headers=3D/S765AT/auto/third_party/vxworks/vw5.1.1/vw/h This built fine and appears to work fine. My Problem =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The code that is being debugged is being generated and so to some extent is= not in normal format, but that is not really the issue. The main problem = is that my system is designed to set break points on lines like (of which t= here may be many instances of in a file):- { __analog_shell_debug_variable;} where _analog_shell_debug_variable is declared as static volatile char _analog_shell_debug_variable =3D '\0'; If I compile this with the older version of the compiler it always happily = sets break points. However if I compile it with the new version of the com= piler it does not always find the line in the source......I get errors like= :- break t1.c:22 No source file named t1.c = which I find very worrying...the file does exist!!!!! or No line 61 in file "t1.c" where line 61 is { __analog_shell_debug_variable;}. I have tried -g, -g1, -g2 etc with the same results. I realise that the { = __analog_shell_debug_variable;} is doing nothing and that maybe the compile= r is compiling it out. In fact if I change it to something like { int i =3D= __analog_shell_debug_variable;} it seems to fix this problem. However is there any better method...compiler flags for example that I coul= d try. I also sometimes get a problem after I have set a break point, in t= hat when I try and run to it, it seems to think that its running to a break= point in a different file??? But most of the time it seems to work. Howe= ver is there any known problems regarding 3.0.2 and gdb. Should I rebuild = a new version of vxgdb? I have attached some vxgdb output when I attempt to set break points that d= o not work at all. Thanks for your help. If I need to give more info, then please let me know. Phil Prentice --=_FFA286E8.C9A8C5F3 Content-Type: text/plain Content-Disposition: attachment; filename="x.c" Content-length: 1329 ir /s760hp02/atemgr/phil/Ccmm /s760hp02/localscatedev/config target vxworks cpuhp02 target vxworks cpuhp02 GDB is free software and you are welcome to 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. GDB 4.13 (hppa1.1-hp-hpux --target vxworks68), Copyright 1994 Free Software Foundation, Inc. (vxgdb) attach -2 Source directories searched: /s760hp02/atemgr/phil/Ccmm:/s760hp02/localscatedev/config:$cdir:$cwd (vxgdb) Attaching remote machine across net... Connected to cpuhp02. Looking in Unix path for all loaded modules: /s760hp02/localscatedev/ATE/lib/data/vxWorks.C_VXI: ok Ccmm: Ccmm: No such file or directory. cmm: cmm: No such file or directory. new: new: No such file or directory. firmware_object.o: firmware_object.o: No such file or directory. Done. (vxgdb) (vxgdb) (vxgdb) load /s760hp02/atemgr/phil/Ccmm/Ccmm Reading symbols from /s760hp02/atemgr/phil/Ccmm/Ccmm...done. (vxgdb) dir /s760hp02/atemgr/phil/Ccmm Source directories searched: /s760hp02/atemgr/phil/Ccmm:/s760hp02/localscatedev/config:$cdir:$cwd (vxgdb) set prompt (vxgdb) set prompt (vxgdb) (vxgdb) (vxgdb) break t1.c:22 Breakpoint 1 at 0x6319b0: file t1.c, line 22. (vxgdb) break t1.c:61 No line 61 in file "t1.c". (vxgdb) --=_FFA286E8.C9A8C5F3--