mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-28 06:20:30 +00:00
2001-01-29 Michael Chastain <chastain@redhat.com>
* symtab.c (block_lookup_symbol): Use 'namespace' parameter in symbol comparisons in binary search.
This commit is contained in:
parent
9add9c04bd
commit
c9049fc98f
@ -1,3 +1,8 @@
|
||||
2001-01-29 Michael Chastain <chastain@redhat.com>
|
||||
|
||||
* symtab.c (block_lookup_symbol): Use 'namespace' parameter in
|
||||
symbol comparisons in binary search.
|
||||
|
||||
2000-01-27 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* win32-nat.c (child_xfer_memory): Add missing argument required by
|
||||
|
@ -1259,8 +1259,11 @@ lookup_block_symbol (register const struct block *block, const char *name,
|
||||
while (bot < top)
|
||||
{
|
||||
sym = BLOCK_SYM (block, bot);
|
||||
if (SYMBOL_MATCHES_NAME (sym, name))
|
||||
return sym;
|
||||
if (SYMBOL_NAMESPACE (sym) == namespace &&
|
||||
SYMBOL_MATCHES_NAME (sym, name))
|
||||
{
|
||||
return sym;
|
||||
}
|
||||
bot++;
|
||||
}
|
||||
}
|
||||
|
57
gdb/testsuite/gdb.base/structs3.c
Normal file
57
gdb/testsuite/gdb.base/structs3.c
Normal file
@ -0,0 +1,57 @@
|
||||
/* gdb-gnats gdb/15 */
|
||||
|
||||
struct tag_00 * tag_00 (int a0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifdef usestubs
|
||||
set_debug_traps ();
|
||||
breakpoint ();
|
||||
#endif
|
||||
|
||||
tag_00( 0 );
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sym_0;
|
||||
int sym_1;
|
||||
int sym_2;
|
||||
int sym_3;
|
||||
int sym_4;
|
||||
int sym_5;
|
||||
int sym_6;
|
||||
int sym_7;
|
||||
int sym_8;
|
||||
int sym_9;
|
||||
int sym_10;
|
||||
int sym_11;
|
||||
int sym_12;
|
||||
int sym_13;
|
||||
int sym_14;
|
||||
int sym_15;
|
||||
int sym_16;
|
||||
int sym_17;
|
||||
int sym_18;
|
||||
int sym_19;
|
||||
int sym_20;
|
||||
int sym_21;
|
||||
int sym_22;
|
||||
int sym_23;
|
||||
int sym_24;
|
||||
int sym_25;
|
||||
int sym_26;
|
||||
int sym_27;
|
||||
int sym_28;
|
||||
int sym_29;
|
||||
int sym_30;
|
||||
int sym_31;
|
||||
int sym_32;
|
||||
int sym_33;
|
||||
int sym_34;
|
||||
int sym_35;
|
||||
int sym_36;
|
||||
int sym_37;
|
55
gdb/testsuite/gdb.base/structs3.exp
Normal file
55
gdb/testsuite/gdb.base/structs3.exp
Normal file
@ -0,0 +1,55 @@
|
||||
# Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-gdb@prep.ai.mit.edu
|
||||
|
||||
# Written by Michael Chastain <chastain@redhat.com>
|
||||
# This is gdb-gnats gdb/15.
|
||||
|
||||
if $tracelevel then {
|
||||
strace $tracelevel
|
||||
}
|
||||
|
||||
set prms_id 0
|
||||
set bug_id 0
|
||||
|
||||
set testfile "structs3"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
# build the first test case
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
if { ![runto_main] } then {
|
||||
perror "couldn't run to breakpoint"
|
||||
continue
|
||||
}
|
||||
|
||||
gdb_test "ptype tag_00" "type.*=.*struct.*tag_00.*incomplete type.*int.*"
|
||||
|
||||
# End of tests.
|
||||
|
||||
gdb_continue_to_end "finish program"
|
Loading…
Reference in New Issue
Block a user