bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cflow] cflow-1.1 doesn't find main


From: Robert E. Michael
Subject: Re: [Bug-cflow] cflow-1.1 doesn't find main
Date: Fri, 08 Sep 2006 15:37:09 -0400

Sergey,
    The output you requested is in the attached file.  I tried to print
several variables, but that did not work very well.  I also tried to
stop in the declare routine so that I could plant a stop right
before the "error_at_line" gets called.  But that did not work - it
did not stop.  I probably do not know the proper commands for
doing that in gdb.

Bob Michael

Sergey Poznyakoff wrote:

> Hi Robert,
>
> > I have not looked at the makefile yet, but is there an easy way to build
> > a debug version with symbols so that I can use gdb to tell you where it
> > is dying?
>
> Yes, there is.  Configure it with --enable-debug switch, then run `make
> clean' and `make'.
>
> > I have never used gdb, and
> > its command set might be vastly different from the dbx one.  So I may
> > need some hints from you.
>
> Sure.  Let's start with the following:
>
> 1. Run `gdb cflow'
> 2. On gdb prompt, type `run -ix^s c.c'
> 3. When it coredumps, type `where' and send me the output it produces.
>
> This will give me sufficient info to decide on what to do next.
>
> I'll be on line to attend your mails within the nearest four hours (my TZ
> is 7 hours ahead of yours).
>
> Regards,
> Sergey
GNU gdb 5.2.1
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-solaris"...
(gdb) run -ix c.c
Starting program: /opt/sfw/cflow-1.1/src/cflow -ix c.c

Program received signal SIGSEGV, Segmentation fault.
0xff2b44e8 in strlen () from /usr/lib/libc.so.1
(gdb) where
#0  0xff2b44e8 in strlen () from /usr/lib/libc.so.1
#1  0xff306ac8 in _doprnt () from /usr/lib/libc.so.1
#2  0xff308498 in fprintf () from /usr/lib/libc.so.1
#3  0x00028584 in error_at_line (status=0, errnum=0, file_name=0x577c0 "c.c", 
    line_number=1492, message=0x2f760 "%s/%d redefined") at error.c:275
#4  0x00018920 in declare (ident=0xffbff348, maybe_knr=0) at parser.c:986
#5  0x00017844 in parse_dcl (ident=0xffbff348, maybe_knr=0) at parser.c:677
#6  0x00017274 in parse_variable_declaration (ident=0xffbff348, parm=0)
    at parser.c:543
#7  0x000169f0 in parse_declaration (ident=0xffbff348, parm=0) at parser.c:370
#8  0x0001688c in yyparse () at parser.c:333
#9  0x000150f0 in main (argc=3, argv=0xffbff44c) at main.c:780
(gdb) print ident
$1 = {int ()} 0x1ca9c <ident>
(gdb) print ident->name
Attempt to extract a component of a value that is not s structure pointer
(gdb) print sp
No symbol "sp" in current context
(gdb) up
#1  0xff306ac8 in _doprnt () from /usr/lib/libc.so.1
(gdb) up
#2  0xff308498 in fprintf () from /usr/lib/libc.so.1
(gdb) up
#3  0x00028584 in error_at_line (status=0, errnum=0, file_name=0x577c0 "c.c", 
    line_number=1492, message=0x2f760 "%s/%d redefined") at error.c:275
275             fprintf (stderr, "%s:", program_name);
(gdb) print ident
$2 = {int ()} 0x1ca9c <ident>
(gdb) q
The program is running.  Exit anyway? (y or n) 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]