public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/10639] New: Setting a breakpoint with condition with MI yields an error
@ 2009-09-14 21:10 dodji at redhat dot com
  2009-09-15 17:31 ` [Bug c++/10639] " swagiaal at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dodji at redhat dot com @ 2009-09-14 21:10 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/10639] Setting a breakpoint with condition with MI yields an error
  2009-09-14 21:10 [Bug c++/10639] New: Setting a breakpoint with condition with MI yields an error dodji at redhat dot com
@ 2009-09-15 17:31 ` swagiaal at redhat dot com
  2009-09-16  5:43 ` dodji at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: swagiaal at redhat dot com @ 2009-09-15 17:31 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From swagiaal at redhat dot com  2009-09-15 17:31 -------
Hmm.. I can't seem to reproduce. Am I missing something ?

[swagiaal@f12-x8664 build]$ ./gdb/gdb  --interpreter=mi2 ../../test/test
~"GNU gdb (GDB) 6.8.50.20090819-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"
~"(no debugging symbols found)\n"
(gdb) 
-break-insert -c "i == 0" -f main
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400478",at="<main+4>",cond="i
== 0",times="0",original-location="main"}
(gdb)

-- 


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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/10639] Setting a breakpoint with condition with MI yields an error
  2009-09-14 21:10 [Bug c++/10639] New: Setting a breakpoint with condition with MI yields an error dodji at redhat dot com
  2009-09-15 17:31 ` [Bug c++/10639] " swagiaal at redhat dot com
@ 2009-09-16  5:43 ` dodji at redhat dot com
  2009-09-18 20:11 ` dodji at redhat dot com
  2009-09-24 14:48 ` swagiaal at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dodji at redhat dot com @ 2009-09-16  5:43 UTC (permalink / raw)
  To: gdb-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 639 bytes --]


------- Additional Comments From dodji at redhat dot com  2009-09-16 05:43 -------
Subject: Re:  Setting a breakpoint with condition with MI yields
 an error

Le 15/09/2009 19:31, swagiaal at redhat dot com a écrit :
> ------- Additional Comments From swagiaal at redhat dot com  2009-09-15 17:31 -------
> Hmm.. I can't seem to reproduce. Am I missing something ?
> 
Hmmh, I have compiled it with the c++ compiler. Is that what you have done
as well ?


-- 


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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/10639] Setting a breakpoint with condition with MI yields an error
  2009-09-14 21:10 [Bug c++/10639] New: Setting a breakpoint with condition with MI yields an error dodji at redhat dot com
  2009-09-15 17:31 ` [Bug c++/10639] " swagiaal at redhat dot com
  2009-09-16  5:43 ` dodji at redhat dot com
@ 2009-09-18 20:11 ` dodji at redhat dot com
  2009-09-24 14:48 ` swagiaal at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dodji at redhat dot com @ 2009-09-18 20:11 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From dodji at redhat dot com  2009-09-18 20:11 -------
So it seems that this commit fixes the issue for me:

commit 56f8aefa0bb94b256d68b99bc8db665ed6813bcf
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Fri Sep 18 15:01:41 2009 -0400

    Check has_stack_frames() before calling find_pc_line.


The commit is not yet on archer-jankratochvil-fedora12 though.

-- 


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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/10639] Setting a breakpoint with condition with MI yields an error
  2009-09-14 21:10 [Bug c++/10639] New: Setting a breakpoint with condition with MI yields an error dodji at redhat dot com
                   ` (2 preceding siblings ...)
  2009-09-18 20:11 ` dodji at redhat dot com
@ 2009-09-24 14:48 ` swagiaal at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: swagiaal at redhat dot com @ 2009-09-24 14:48 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From swagiaal at redhat dot com  2009-09-24 14:48 -------
Fix has been committed and a new fedora spin made:

gdb-6.8.91.20090921-1.fc12
http://koji.fedoraproject.org/koji/buildinfo?buildID=132977

Thanks Jan

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-24 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-14 21:10 [Bug c++/10639] New: Setting a breakpoint with condition with MI yields an error dodji at redhat dot com
2009-09-15 17:31 ` [Bug c++/10639] " swagiaal at redhat dot com
2009-09-16  5:43 ` dodji at redhat dot com
2009-09-18 20:11 ` dodji at redhat dot com
2009-09-24 14:48 ` swagiaal at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).