This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug c++/10639] New: Setting a breakpoint with condition with MI yields an error


Here is a description of the problem:

[dodji@tutu srcs]$ cat -n test.cc 
     1  int i = 0;
     2  
     3  int
     4  main ()
     5  {
     6      ++i;
     7      return i;
     8  }


[dodji@tutu srcs]$ gdb --interpreter=mi2 test
~"GNU gdb (GDB) 6.8.50.20090910-cvs\n"
~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
~"This is free software: you are free to change and redistribute it.\n"
~"There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\n"
~"and \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-unknown-linux-gnu\".\n"
~"For bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>...\n"
~"Reading symbols from /home/dodji/devel/srcs/test..."
~"done.\n"
(gdb) 
-break-insert -c "i == 0" main
^error,msg="No registers."
(gdb)
-break-insert -c "i == 0" -f main
^error,msg="No registers."
(gdb) 


The callstack of the problem is:

#0  error(string = 0x68cb75 \"No registers.\") at utils.c:812
#1  get_current_frame() at frame.c:1120
#2  get_selected_frame(message = 0x68cb75 \"No registers.\") at frame.c:1193
#3  cp_lookup_symbol_imports(scope = 0x6972e7 \"\", name = 0x1 <Address 0x1 out
of bounds>, block = 0x0, domain = 4294967208, declaration_only = -19064,
search_parents = -16814484) at cp-namespace.c:445
#4  lookup_symbol_aux_local() at symtab.c:1384
#5  lookup_symbol_aux() at symtab.c:1321
#6  lookup_symbol_in_language(name = <value optimized out>, block = 0xb685d0,
domain = <value optimized out>, lang = language_cplus, is_a_field_of_this =
0x7fffffffb76c) at symtab.c:1278
#7  c_lex() at c-exp.y:2350
#8  c_parse_internal() at c-exp.c.tmp:1897
#9  c_parse() at c-exp.y:2455
#10  parse_exp_in_context(stringptr = <value optimized out>, block = <value
optimized out>, comma = <value optimized out>, void_context_p = <value optimized
out>, out_subexp = <value optimized out>) at parse.c:1104
#11  create_breakpoint() at breakpoint.c:5627
#12  create_breakpoints() at breakpoint.c:5817
#13  break_command_really(gdbarch = <value optimized out>, arg = 0xacff74 \"\",
cond_string = 0xb1ad80 \"i == 0\", thread = -1, parse_condition_and_thread =
<value optimized out>, tempflag = <value optimized out>, hardwareflag = 0,
traceflag = 0, ignore_count = 0, pending_break_support = AUTO_BOOLEAN_TRUE, ops
= 0x0, from_tty = 0, enabled = 1) at breakpoint.c:6146
#14  set_breakpoint(gdbarch = 0x68cb75, address = 0x1 <Address 0x1 out of
bounds>, condition = 0x0, hardwareflag = 0, tempflag = <value optimized out>,
thread = -88, ignore_count = 0, pending = 1, enabled = 1) at breakpoint.c:6222
#15  mi_cmd_break_insert(command = <value optimized out>, argv = 0xb37890, argc
= <value optimized out>) at ./mi/mi-cmd-break.c:157
#16  mi_cmd_execute() at ./mi/mi-main.c:1388
#17  captured_mi_execute_command(uiout = 0xa92060, data = <value optimized out>)
at ./mi/mi-main.c:1194
#18  catch_exception(uiout = <value optimized out>, func = <value optimized
out>, func_args = <value optimized out>, mask = <value optimized out>) at
exceptions.c:462
#19  mi_execute_command(cmd = <value optimized out>, from_tty = <value optimized
out>) at ./mi/mi-main.c:1288
#20  process_event() at event-loop.c:394
#21  gdb_do_one_event(data = <value optimized out>) at event-loop.c:459
#22  catch_errors(func = <value optimized out>, func_args = <value optimized
out>, errstring = <value optimized out>, mask = <value optimized out>) at
exceptions.c:510
#23  start_event_loop() at event-loop.c:483
#24  captured_command_loop(data = 0x68cb75) at ./main.c:227
#25  catch_errors(func = <value optimized out>, func_args = <value optimized
out>, errstring = <value optimized out>, mask = <value optimized out>) at
exceptions.c:510
#26  captured_main(data = <value optimized out>) at ./main.c:948
#27  catch_errors(func = <value optimized out>, func_args = <value optimized
out>, errstring = <value optimized out>, mask = <value optimized out>) at
exceptions.c:510
#28  gdb_main(args = 0x1) at ./main.c:958
#29  main(argc = <value optimized out>, argv = 0x1) at gdb.c:33

This is on the archer-jankratochvil-fedora12 branch, commit 941eb

-- 
           Summary: Setting a breakpoint with condition with MI yields an
                    error
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: dodji at redhat dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10639

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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