gdb/15: lookup_block_symbol ignores namespace parameter in binary search

chastain@redhat.com chastain@redhat.com
Mon Jan 29 13:48:00 GMT 2001


>Number:         15
>Category:       gdb
>Synopsis:       lookup_block_symbol ignores namespace parameter in binary search
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 29 13:48:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Michael Chastain
>Release:        sourceware CVS
>Organization:
>Environment:
Red Hat Linux 7
(not environment sensitive)
>Description:
lookup_block_symbol ignores its 'namespace' parameter in the binary search.

This causes problems on code such as:

  struct tag_00 * tag_00 (int a0)
  {
     return 0;
  }

... where tag_00 is an incomplete structure tag (although it may be defined somewhere else in the program).

The effect of this bug in my test program is to grab the wrong "struct type" in check_typedef(), circularizing the type tree with TYPE_CODE_PTR and TYPE_CODE_FUNC types that point to each other.
c_type_print_base goes into recursive death when this happens.
>How-To-Repeat:
run gdb on itself
ptype gdbarch_tdep
>Fix:
Probably a 1-liner in lookup_block_type
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gdb-prs mailing list