This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]