* RE: How do I set breakpoints on all lines for a particular file.
@ 2004-02-27 15:03 Kotian, Deepak
2004-02-29 4:03 ` Andrew Cagney
0 siblings, 1 reply; 8+ messages in thread
From: Kotian, Deepak @ 2004-02-27 15:03 UTC (permalink / raw)
To: gdb
Any inputs on this please.
Thanks and Regards
Deepak
-----Original Message-----
From: Kotian, Deepak
Sent: Tuesday, February 24, 2004 7:31 PM
To: gdb@sources.redhat.com
Subject: How do I set breakpoints on all lines for a particular file.
Hi,
How do I set breakpoints in gdb on all lines for a a target program file.
Basically, I need to know if any code segment is executed from
that file.
Thanks and Regards
Deepak
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: How do I set breakpoints on all lines for a particular file.
@ 2004-02-29 19:09 Kotian, Deepak
0 siblings, 0 replies; 8+ messages in thread
From: Kotian, Deepak @ 2004-02-29 19:09 UTC (permalink / raw)
To: ramana, Andrew Cagney, ramana; +Cc: gdb
Thanks
Thanks and Regards
Deepak
-----Original Message-----
From: Ramana Radhakrishnan [mailto:ramana.radhakrishnan@codito.com]
Sent: Sun 2/29/2004 9:08 PM
To: Andrew Cagney; ramana@codito.com
Cc: Kotian, Deepak; gdb@sources.redhat.com
Subject: Re: How do I set breakpoints on all lines for a particular file.
> nope :-( but the theory is ok :-/
Just parameterise this in a shell script and possibly add stuff to take care
of the file names .
At the command prompt you could do this.
$>objdump -t try.o | awk '{ if($3 == "F") { printf ("break try.c:
%s\n",$6);}}' > fooscript
fooscript would contain stuff like break try.c:<function name> and so on.
$> gdb
gdb> source fooscript.
Cant think of anything else unless we want to implement rbreak to take care of
file names too :-/
cheers
ramana
^ permalink raw reply [flat|nested] 8+ messages in thread* RE: How do I set breakpoints on all lines for a particular file.
@ 2004-02-29 8:10 Kotian, Deepak
2004-02-29 10:37 ` Ramana Radhakrishnan
0 siblings, 1 reply; 8+ messages in thread
From: Kotian, Deepak @ 2004-02-29 8:10 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
Break at all functions in a particular file(.c file), can it be done?
Thanks and Regards
Deepak
-----Original Message-----
From: Andrew Cagney [mailto:cagney@gnu.org]
Sent: Sunday, February 29, 2004 9:34 AM
To: Kotian, Deepak
Cc: gdb@sources.redhat.com
Subject: Re: How do I set breakpoints on all lines for a particular
file.
> How do I set breakpoints in gdb on all lines for a a target program file.
> Basically, I need to know if any code segment is executed from
> that file.
Other than explicitly setting a breakpoint on every line, I don't know.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How do I set breakpoints on all lines for a particular file.
2004-02-29 8:10 Kotian, Deepak
@ 2004-02-29 10:37 ` Ramana Radhakrishnan
2004-02-29 14:57 ` Andrew Cagney
0 siblings, 1 reply; 8+ messages in thread
From: Ramana Radhakrishnan @ 2004-02-29 10:37 UTC (permalink / raw)
To: Kotian, Deepak, Andrew Cagney; +Cc: gdb
On Sunday 29 February 2004 13:45, Kotian, Deepak wrote:
> Break at all functions in a particular file(.c file), can it be done?
If you have the corresponding object file , maybe you can write a shell / awk
/ perl script to generate this using objdump -t and finding out the function
symbols and using that in a gdb script and then include that using the source
command.
Dont know of any other way of setting breakpoints with respect to all
functions in the file you need.
cheers
ramana
>
> Thanks and Regards
> Deepak
>
>
> -----Original Message-----
> From: Andrew Cagney [mailto:cagney@gnu.org]
> Sent: Sunday, February 29, 2004 9:34 AM
> To: Kotian, Deepak
> Cc: gdb@sources.redhat.com
> Subject: Re: How do I set breakpoints on all lines for a particular
> file.
>
> > How do I set breakpoints in gdb on all lines for a a target program file.
> > Basically, I need to know if any code segment is executed from
> > that file.
>
> Other than explicitly setting a breakpoint on every line, I don't know.
>
> Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How do I set breakpoints on all lines for a particular file.
2004-02-29 10:37 ` Ramana Radhakrishnan
@ 2004-02-29 14:57 ` Andrew Cagney
2004-02-29 15:42 ` Ramana Radhakrishnan
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2004-02-29 14:57 UTC (permalink / raw)
To: ramana; +Cc: Kotian, Deepak, gdb
> On Sunday 29 February 2004 13:45, Kotian, Deepak wrote:
>
>>> Break at all functions in a particular file(.c file), can it be done?
>
>
> If you have the corresponding object file , maybe you can write a shell / awk
> / perl script to generate this using objdump -t and finding out the function
> symbols and using that in a gdb script and then include that using the source
> command.
>
> Dont know of any other way of setting breakpoints with respect to all
> functions in the file you need.
Hmm, there's an idea:
(top-gdb) rbreak 'main.c:*(*)'
nope :-( but the theory is ok :-/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How do I set breakpoints on all lines for a particular file.
2004-02-29 14:57 ` Andrew Cagney
@ 2004-02-29 15:42 ` Ramana Radhakrishnan
0 siblings, 0 replies; 8+ messages in thread
From: Ramana Radhakrishnan @ 2004-02-29 15:42 UTC (permalink / raw)
To: Andrew Cagney, ramana; +Cc: Kotian, Deepak, gdb
> nope :-( but the theory is ok :-/
Just parameterise this in a shell script and possibly add stuff to take care
of the file names .
At the command prompt you could do this.
$>objdump -t try.o | awk '{ if($3 == "F") { printf ("break try.c:
%s\n",$6);}}' > fooscript
fooscript would contain stuff like break try.c:<function name> and so on.
$> gdb
gdb> source fooscript.
Cant think of anything else unless we want to implement rbreak to take care of
file names too :-/
cheers
ramana
^ permalink raw reply [flat|nested] 8+ messages in thread
* How do I set breakpoints on all lines for a particular file.
@ 2004-02-24 13:56 Kotian, Deepak
0 siblings, 0 replies; 8+ messages in thread
From: Kotian, Deepak @ 2004-02-24 13:56 UTC (permalink / raw)
To: gdb
Hi,
How do I set breakpoints in gdb on all lines for a a target program file.
Basically, I need to know if any code segment is executed from
that file.
Thanks and Regards
Deepak
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-02-29 19:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-27 15:03 How do I set breakpoints on all lines for a particular file Kotian, Deepak
2004-02-29 4:03 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2004-02-29 19:09 Kotian, Deepak
2004-02-29 8:10 Kotian, Deepak
2004-02-29 10:37 ` Ramana Radhakrishnan
2004-02-29 14:57 ` Andrew Cagney
2004-02-29 15:42 ` Ramana Radhakrishnan
2004-02-24 13:56 Kotian, Deepak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox