[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    RE: HPUX-DEVTOOLS: gdb : Location not found  error on "list"
From:       "Vuppula, Himabindu" <himabindu.vuppula () hp ! com>
Date:       2005-08-04 20:31:58
Message-ID: E3E9C9BF52F45640B62EA8EB49C427C8140545 () ataexc03 ! americas ! cpqcorp ! net
[Download RAW message or body]

> it is part of a .sl, which is compiled with -g option.

Aah! You can list the lines in a .C of this .sl only after the debug
info for this .sl is loaded. Only after you attach the line number
tables from this .sl will be read in, and so, you can list the lines
only after attach.

$ ./gdb a.out
HP gdb 5.1.9%IZ2 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.1.9%IZ2 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for
warranty/support.
..
(gdb) l b.c:1
Location not found
(gdb) attach 27978
Attaching to program: a.out, process 27978
main () at a.c:71
71      {};
(gdb) l b.c:1
1       int foo ()
2       {
3        return 10;
4       }
(gdb) q

-Bindu


>
> -----Original Message-----
> From: owner-hpux-devtools@cxx.cup.hp.com
> [mailto:owner-hpux-devtools@cxx.cup.hp.com] On Behalf Of
> Vuppula, Himabindu
> Sent: Thursday, August 04, 2005 1:07 AM
> To: Banibrata Dutta; hpux-devtools@cxx.cup.hp.com
> Subject: RE: HPUX-DEVTOOLS: gdb : Location not found error on "list"
>
> Hello Banibrata,
>
> Since you are talking about .sl, I am assuming this is on PA.
>
> So which module did SomeSource.C get compiled into? Is it
> part of the main executable BinaryToBeDebugged or is it part of a .sl?
>
> -Bindu
>
>
> > -----Original Message-----
> > From: owner-hpux-devtools@cxx.cup.hp.com
> > [mailto:owner-hpux-devtools@cxx.cup.hp.com] On Behalf Of Banibrata
> > Dutta
> > Sent: Wednesday, August 03, 2005 9:52 AM
> > To: hpux-devtools@cxx.cup.hp.com
> > Subject: HPUX-DEVTOOLS: gdb : Location not found error on "list"
> >
> >
> > Hi,
> >
> > I am trying to use gdb (wdb cli). Here's my scenario.
> >
> > I've done the build of my software on one machine X. Software is
> > divided into multiple module (i.e. *.sl & *.a). Some of the
> *.sl & *.a
> > are rebuilt with "-g" option, others are not.
> > The executable itself is built with "-g" option.
> >
> > I am debugging my software in another machine Y. I have put the
> > binaries (executable & *.sl & *.a) on the target environment. Also
> > I've brought the code of all the module that have been rebuilt with
> > "-g" option, but not all modules (i.e. which we not
> rebuilt), on the
> > target machine (Y). I would like to attach to the running
> process (the
> > executable built with debug option). For this I've do the following:
> >
> > (gdb) file BinaryToBeDebugged
> > (gdb) dir /home/dutta/SOURCE/module1:/home/dutta/SOURCE/module2
> > (gdb) list SomeSource.C
> > Location not found
> >
> > I am sure that /home/dutta/SOURCE/module1/SomeSource.C does exist on
> > the target machine (Y). So why am I getting this "Location
> not found"
> > error ? Is it because that I am still missing source of some of the
> > module (which I did not rebuild) ?
> >
> > My intention is finally attach to the running process, after setting
> > some breakpoints, but I'm stuck at the intial stage itself. Any
> > help/pointer would be appreciated.
> >
> > thanks & regards,
> > banibrata
> > _________________________________________________________________
> >  To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
> >     with the message UNSUBSCRIBE hpux-devtools
> > _________________________________________________________________
> >
>  _________________________________________________________________
>  To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
>     with the message UNSUBSCRIBE hpux-devtools
> _________________________________________________________________
>
>
>
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic