This is the mail archive of the gdb-patches@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]

[RFA 0/3 V4] Fix pascal behavior for class fields with testcase


  Hi all,

this is a new round of my patch series to 
treat fields of this like any other variable
in the pascal parser.


  Pierre Muller
as pascal language maintainer.

PS: I got problem to test my series because I get an
internal-error with stabs generated debug information:

Doug, I suspect this is due to the series you committed 
Re: [PATCH 0/5] Remove struct main_type.vptr_{fieldno,basetype}


$ ../gdb --args ../gdb ./gdb.pascal/case-insensitive-symbols
.........
(top-gdb) run
Breakpoint 1, internal_error (file=0x7f5fcc
<NS_INTEGER_POINTER_CONVERSION_BADNESS+204>
"../../../binutils-gdb/gdb/gdbtypes.c", line=1204,
    fmt=0x7f5f9e <NS_INTEGER_POINTER_CONVERSION_BADNESS+158> "%s: Assertion
`%s' failed.") at ../../../binutils-gdb/gdb/common/errors.c:54
54        va_start (ap, fmt);
(top-gdb) bt
#0  internal_error (file=0x7f5fcc
<NS_INTEGER_POINTER_CONVERSION_BADNESS+204>
"../../../binutils-gdb/gdb/gdbtypes.c", line=1204,
    fmt=0x7f5f9e <NS_INTEGER_POINTER_CONVERSION_BADNESS+158> "%s: Assertion
`%s' failed.") at ../../../binutils-gdb/gdb/common/errors.c:54
#1  0x00570b43 in internal_type_self_type (type=0x801b1628) at
../../../binutils-gdb/gdb/gdbtypes.c:1204
#2  0x005e31a3 in read_member_functions (fip=0x2c2a354, pp=0x2c2a4c0,
type=0x801b1540, objfile=0x8014baa0) at
../../../binutils-gdb/gdb/stabsread.c:2389
#3  0x005e5c1d in read_struct_type (pp=0x2c2a4c0, type=0x801b1540,
type_code=TYPE_CODE_STRUCT, objfile=0x8014baa0) at
../../../binutils-gdb/gdb/stabsread.c:3555
#4  0x005e23c7 in read_type (pp=0x2c2a4c0, objfile=0x8014baa0) at
../../../binutils-gdb/gdb/stabsread.c:2006
#5  0x005e0b16 in define_symbol (valu=0,
    string=0x801a6ebc
"TOBJECT:Tt15=s4$vf15:14,0;CREATE::17=##16;:__ct__7TOBJECT7POINTER;2A.;DESTR
OY::18=##3;:__dt__7TOBJECT7POINTER;2A*0;15;;NEWINSTANCE::19=##16;:11unnamedt
ype;2A*1;15;;FREEINSTANCE::20=##3;:7TOBJECT;2A*2;"..., desc=0, type=128,
objfile=0x8014baa0) at ../../../binutils-gdb/gdb/stabsread.c:1316
#6  0x005ac0f6 in process_one_symbol (type=128, desc=0, valu=0,
    name=0x801a6ebc
"TOBJECT:Tt15=s4$vf15:14,0;CREATE::17=##16;:__ct__7TOBJECT7POINTER;2A.;DESTR
OY::18=##3;:__dt__7TOBJECT7POINTER;2A*0;15;;NEWINSTANCE::19=##16;:11unnamedt
ype;2A*1;15;;FREEINSTANCE::20=##3;:7TOBJECT;2A*2;"...,
section_offsets=0x8015ba88, objfile=0x8014baa0) at
../../../binutils-gdb/gdb/dbxread.c:3217
#7  0x005ab00d in read_ofile_symtab (objfile=0x8014baa0, pst=0x801a7c00) at
../../../binutils-gdb/gdb/dbxread.c:2601
#8  0x005aaa85 in dbx_psymtab_to_symtab_1 (objfile=0x8014baa0,
pst=0x801a7c00) at ../../../binutils-gdb/gdb/dbxread.c:2418
#9  0x005aabbc in dbx_read_symtab (self=0x801a7c00, objfile=0x8014baa0) at
../../../binutils-gdb/gdb/dbxread.c:2471
#10 0x0051fb16 in psymtab_to_symtab (objfile=0x8014baa0, pst=0x801a7c00) at
../../../binutils-gdb/gdb/psymtab.c:788
#11 0x0051f3a3 in psym_lookup_symbol (objfile=0x8014baa0, block_index=0,
name=0x8003ba88 "main", domain=VAR_DOMAIN) at
../../../binutils-gdb/gdb/psymtab.c:520
#12 0x00518210 in lookup_symbol_via_quick_fns (objfile=0x8014baa0,
block_index=0, name=0x8003ba88 "main", domain=VAR_DOMAIN) at
../../../binutils-gdb/gdb/symtab.c:2436
#13 0x00518558 in lookup_symbol_in_objfile (objfile=0x8014baa0,
block_index=0, name=0x8003ba88 "main", domain=VAR_DOMAIN) at
../../../binutils-gdb/gdb/symtab.c:2604
#14 0x0051872f in lookup_symbol_global_iterator_cb (objfile=0x8014baa0,
cb_data=0x2c2a888) at ../../../binutils-gdb/gdb/symtab.c:2685
#15 0x0041bda5 in windows_iterate_over_objfiles_in_search_order
(gdbarch=0x8014a3a8, cb=0x5186bf <lookup_symbol_global_iterator_cb>,
cb_data=0x2c2a888, current_objfile=0x0)
    at ../../../binutils-gdb/gdb/windows-tdep.c:452
#16 0x0056c62c in gdbarch_iterate_over_objfiles_in_search_order
(gdbarch=0x8014a3a8, cb=0x5186bf <lookup_symbol_global_iterator_cb>,
cb_data=0x2c2a888, current_objfile=0x0)
    at ../../../binutils-gdb/gdb/gdbarch.c:4412
#17 0x00518847 in lookup_global_symbol (name=0x8003ba88 "main", block=0x0,
domain=VAR_DOMAIN) at ../../../binutils-gdb/gdb/symtab.c:2730
#18 0x00518386 in basic_lookup_symbol_nonlocal (langdef=0x81cf80
<c_language_defn>, name=0x8003ba88 "main", block=0x0, domain=VAR_DOMAIN) at
../../../binutils-gdb/gdb/symtab.c:2530
#19 0x00517b46 in lookup_symbol_aux (name=0x8003ba88 "main", block=0x0,
domain=VAR_DOMAIN, language=language_c, is_a_field_of_this=0x0) at
../../../binutils-gdb/gdb/symtab.c:2148
#20 0x00517501 in lookup_symbol_in_language (name=0x8003ba88 "main",
block=0x0, domain=VAR_DOMAIN, lang=language_c, is_a_field_of_this=0x0) at
../../../binutils-gdb/gdb/symtab.c:1944
#21 0x00517546 in lookup_symbol (name=0x8003ba88 "main", block=0x0,
domain=VAR_DOMAIN, is_a_field_of_this=0x0) at
../../../binutils-gdb/gdb/symtab.c:1958
#22 0x00524cee in set_initial_language () at
../../../binutils-gdb/gdb/symfile.c:1698
#23 0x005243bf in symbol_file_add_main_1 (args=0x2c2ac49
"./gdb.pascal/case-insensitive-symbols", from_tty=1, flags=0) at
../../../binutils-gdb/gdb/symfile.c:1327
#24 0x00524360 in symbol_file_add_main (args=0x2c2ac49
"./gdb.pascal/case-insensitive-symbols", from_tty=1) at
../../../binutils-gdb/gdb/symfile.c:1311
#25 0x00556ac9 in catch_command_errors_const (command=0x524340
<symbol_file_add_main>, arg=0x2c2ac49
"./gdb.pascal/case-insensitive-symbols", from_tty=1, mask=RETURN_MASK_ALL)
    at ../../../binutils-gdb/gdb/main.c:396
#26 0x0055799a in captured_main (data=0x2c2abc4) at
../../../binutils-gdb/gdb/main.c:1042
#27 0x00552c81 in catch_errors (func=0x556d1a <captured_main>,
func_args=0x2c2abc4, errstring=0x7eb761 <__PRETTY_FUNCTION__.13998+168> "",
mask=RETURN_MASK_ALL)
    at ../../../binutils-gdb/gdb/exceptions.c:237
#28 0x00557d2f in gdb_main (args=0x2c2abc4) at
../../../binutils-gdb/gdb/main.c:1157
#29 0x0040120c in main (
During symbol reading, incomplete CFI data; DW_CFA_restore unspecified
register ebx (#3) at 0x6100776e.
argc=2, argv=0x2c2abfc) at ../../../binutils-gdb/gdb/gdb.c:32

(top-gdb) f 1
#1  0x00570b43 in internal_type_self_type (type=0x801b1628) at
../../../binutils-gdb/gdb/gdbtypes.c:1204
1204          gdb_assert (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_FUNC);
(top-gdb) p *type.main_type
$1 = {code = TYPE_CODE_METHOD, flag_unsigned = 0, flag_nosign = 0, flag_stub
= 1, flag_target_stub = 0, flag_static = 0, flag_prototyped = 0,
flag_incomplete = 0, flag_varargs = 0,
  flag_vector = 0, flag_stub_supported = 0, flag_gnu_ifunc = 0,
flag_fixed_instance = 0, flag_objfile_owned = 1, flag_declared_class = 0,
flag_flag_enum = 0,
  type_specific_field = TYPE_SPECIFIC_NONE, nfields = 0, name = 0x0,
tag_name = 0x0, owner = {objfile = 0x8014baa0, gdbarch = 0x8014baa0},
target_type = 0x801b15e8, flds_bnds = {fields = 0x0,
    bounds = 0x0}, type_specific = {cplus_stuff = 0x0, gnat_stuff = 0x0,
floatformat = 0x0, func_stuff = 0x0, self_type = 0x0}, data_location = 0x0}

No calls to set_type_self_type up to this error point.

TOBJECT is the fundamental class type for Free Pascal,
and this code had no problems before.


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