public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: debug/10466: Can't debug the first function in a C file that is included in another C file
@ 2003-04-25 13:10 drow
  0 siblings, 0 replies; 4+ messages in thread
From: drow @ 2003-04-25 13:10 UTC (permalink / raw)
  To: chrisha, gcc-bugs, gcc-prs, marcusb, nobody, stevee

Synopsis: Can't debug the first function in a C file that is included in another C file

State-Changed-From-To: feedback->open
State-Changed-By: drow
State-Changed-When: Fri Apr 25 13:10:32 2003
State-Changed-Why:
    Thanks, feedback received.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10466


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

* Re: debug/10466: Can't debug the first function in a C file that is included in another C file
@ 2003-04-25  8:56 Steve Evans
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Evans @ 2003-04-25  8:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR debug/10466; it has been noted by GNATS.

From: Steve Evans <stevee@zuken.co.uk>
To: drow@sources.redhat.com, chrisha@zuken.co.uk, gcc-bugs@gcc.gnu.org,
        gcc-prs@gcc.gnu.org, marcusb@zuken.co.uk, nobody@gcc.gnu.org,
        stevee@zuken.co.uk, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: debug/10466: Can't debug the first function in a C file that is included in another C file
Date: 25 Apr 2003 09:53:43 +0100

 --=-=-=
 
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 On 25 Apr 2003, drow@sources.redhat.com wrote:
 
 >Synopsis: Can't debug the first function in a C file that is included
 >in another C file
 >
 >State-Changed-From-To: open->feedback
 >State-Changed-By: drow
 >State-Changed-When: Fri Apr 25 02:18:24 2003
 >State-Changed-Why:
 >Please see the bug reporting instructions on gcc.gnu.org.
 >Could you supply a small testcase?
 >
 >http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10466
 
 Ok. Enclosed are two files, foo.c and bar.c. Compile foo.c, which
 #includes "bar.c"  as:
 
   gcc -f -fPIC foo.c
 
 Note that since reporting the bug I have discovered that it only
 occurs when compiled with -fPIC. I attempted  to add this information
 to the bug report, but can't edit a report when logged on as guest and
 there doesn't seem to be any way of creating a new login ID.
 
 The run the debugger on it and attempt to break in the function bar,
 which is the first function in bar.c:
 
 ,----
 | stevee@gorbag:MY CLONE> gdb ./a.out
 | GNU gdb 5.3
 | Copyright 2002 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 "sparc-sun-solaris2.6"...
 | (gdb) b bar
 | Breakpoint 1 at 0x10aa8
 | (gdb) b bar2
 | Breakpoint 2 at 0x10aec: file bar.c, line 13.
 | (gdb) r
 | Starting program: /tmp/a.out 
 | foo
 | 
 | Breakpoint 1, 0x00010aa8 in bar ()
 | (gdb) l
 | 1       #include <stdio.h>
 | 2
 | 3       extern void foo(void);
 | 4       extern int bar(void);
 | 5       extern int bar2(void);
 | 6
 | 7       int main()
 | 8       {
 | 9           foo();
 | 10          bar();
 | (gdb) 
 `----
 
 Note that the function bar2 which exists in the same source file can
 have a break point added successfully.
 
 Thanks for any help with this problem.
 
 
 --=-=-=
 Content-Type: application/octet-stream
 Content-Disposition: attachment; filename=foo.c
 
 #include <stdio.h>
 
 extern void foo(void);
 extern int bar(void);
 extern int bar2(void);
 
 int main()
 {
     foo();
     bar();
     bar2();
 
     return 0;
 }
 
 void foo()
 {
     printf( "foo\n" );
 }
 
 #include "bar.c"
 
 --=-=-=
 Content-Type: application/octet-stream
 Content-Disposition: attachment; filename=bar.c
 
 
 int
 bar()
 {
     printf( "bar\n" );
 
     return 0;
 }
 
 int
 bar2()
 {
     printf( "bar2\n" );
 
     return 2;
 }
 
 --=-=-=
 
 
 Steve
 - -- 
 ____________________________________________________________________________
 Steve Evans,
 Zuken Limited,                     TEL:   +44 (0)1454 207800 ext 8607
 1500 Aztec West,                   Fax:   +44 (0)1454 207803
 Almondsbury,                       mailto:stevee@zuken.co.uk
 Bristol, BS32 4RF, UK              Web:   http://www.zuken.com
 Registered Linux user #217906:     http://counter.li.org
 Public Encryption Key:             http://www.gorbag.com/public-key-work.html
 _____________________________________________________________________________
 
 "We are all slaves to our histories. If there is to be a ..
  bright future, we must learn to break those chains."
 	-- Delenn to Garibaldi in Babylon 5:"GROPOS"
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.1 (SunOS)
 Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
 
 iD8DBQE+qPeT1a67iNP86GcRAqTuAJ44uyoY1zJr/2/cRSCjZYfjOHi1QQCfWltl
 Woad71WrkYk2iHuacIa4Twg=
 =NYKO
 -----END PGP SIGNATURE-----
 
 --=-=-=--


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

* Re: debug/10466: Can't debug the first function in a C file that is included in another C file
@ 2003-04-25  2:18 drow
  0 siblings, 0 replies; 4+ messages in thread
From: drow @ 2003-04-25  2:18 UTC (permalink / raw)
  To: chrisha, gcc-bugs, gcc-prs, marcusb, nobody, stevee

Synopsis: Can't debug the first function in a C file that is included in another C file

State-Changed-From-To: open->feedback
State-Changed-By: drow
State-Changed-When: Fri Apr 25 02:18:24 2003
State-Changed-Why:
    Please see the bug reporting instructions on gcc.gnu.org.
    Could you supply a small testcase?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10466


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

* debug/10466: Can't debug the first function in a C file that is included in another C file
@ 2003-04-23 16:46 stevee
  0 siblings, 0 replies; 4+ messages in thread
From: stevee @ 2003-04-23 16:46 UTC (permalink / raw)
  To: gcc-gnats; +Cc: marcusb, chrisha


>Number:         10466
>Category:       debug
>Synopsis:       Can't debug the first function in a C file that is included in another C file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 23 16:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Steve Evans
>Release:        3.2.2
>Organization:
>Environment:
Solaris 2.6
>Description:
If a C file #includes another C file that contains function definitions 
it is not possible to break on the first function in the included C file.
The debugger behaves as though there is no debug information for
the function.
All other functions within the included C file can have break points added and they work fine.
This is using gdb 5.3
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2003-04-25 13:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-25 13:10 debug/10466: Can't debug the first function in a C file that is included in another C file drow
  -- strict thread matches above, loose matches on Subject: below --
2003-04-25  8:56 Steve Evans
2003-04-25  2:18 drow
2003-04-23 16:46 stevee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).