My */gcc/.gdbinit contains lines like:
#cp_parser_template_parameter:./* ...we have a template type parameter.
break parser.c:9730
condition $bpnum expand_location(input_location).line>(99)
commands
call expand_location(token->location)
call cp_lexer_start_debugging(parser->lexer)
end
Now, there's several of these, and I wanted to use change:
cp_lexer_print_token
to print the line and column numbers of the token. Well,
of course this changed the breakpoint line numbers; so,
I was wondering if there was some way to set a convenience
variable:
http://ftp.sunsite.ualberta.ca/Documentation/Gnu/gdb-4.18/html_node/gdb_60.html#SEC60
so that the breakpoints could conveniently be adjusted
after changes to the source code. IOW, something like:
set $lje_bp_line_correction = 5
set $lje_bp_line_next = (5238+$lje_bp_line_correction)
break parser.c:$lje_bp_line_next
However, this just resulted in:
Breakpoint 3 at 0x58a5a6: file
/home/evansl/download/gcc/4.4-20090630/build/../src/gcc/cp/parser.c,
line 22148.
Breakpoint 4 at 0x0
IOW, it appears the line:
break parser.c:$lje_bp_line_next
doesn't work.
How do I get it to work?
TIA.
-Larry