Bug 18194 - assert failure: x/i 'ns::func():foo'
Summary: assert failure: x/i 'ns::func():foo'
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-02 17:49 UTC by dje
Modified: 2015-04-02 17:49 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2015-04-02 17:49:46 UTC
I was playing with LABEL_DOMAIN while trying to see if I can get rid of STRUCT_DOMAIN and tripped over this.

(gdb) start
(gdb) b ns::func():foo
Breakpoint 3 at 0x400675: file label-domain.cc, line 12.
(gdb) p ns::func():foo
A syntax error in expression, near `:foo'.
(gdb) x/i ns::func():foo
A syntax error in expression, near `:foo'.
(gdb) x/i 'ns::func():foo'
../../gdb-7.9.x/gdb/cp-namespace.c:342: internal-error: cp_search_static_and_baseclasses: Assertion `name[prefix_len + 1] == ':'' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 


int x;

namespace ns
{
  void
  func ()
  {
    x = 0;
    goto foo;
    ++x;
   foo:
    ++x;
  }
}

int
main ()
{
  int foo = 42;

  goto foo;

  foo = 23;

 foo:

  return 0;
}