Skip to content

gdbarch is NULL when it shouldn't be #1

@cooljeanius

Description

@cooljeanius

this gdb is unable to start due to this assertion failing:

    gdbarch.sh:1654: gdbarch_bfd_arch_info called
    gdbarch_dump: bfd_arch_info = i386
    gdbarch_dump: TARGET_BFD_VMA_BIT # (gdbarch_bfd_vma_bit (current_gdbarch))
    gdbarch_dump: bfd_vma_bit = 32
    gdbarch_dump: BREAKPOINT_FROM_PC(pcptr, lenptr) # (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
    gdbarch_dump: breakpoint_from_pc = <0x16f8a0>
    gdbarch_dump: TARGET_BYTE_ORDER # (gdbarch_byte_order (current_gdbarch))
    gdbarch_dump: byte_order = 1
    gdbarch_dump: CALL_DUMMY_LOCATION # (gdbarch_call_dummy_location (current_gdbarch))
    gdbarch_dump: call_dummy_location = 4
    gdbarch_dump: CANNOT_FETCH_REGISTER(regnum) # (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
    gdbarch_dump: cannot_fetch_register = <0x934f0>
    gdbarch_dump: CANNOT_STEP_BREAKPOINT # (gdbarch_cannot_step_breakpoint (current_gdbarch))
    gdbarch_dump: cannot_step_breakpoint = 0
    gdbarch_dump: CANNOT_STORE_REGISTER(regnum) # (gdbarch_cannot_store_register (current_gdbarch, regnum))
    gdbarch_dump: cannot_store_register = <0x934f0>
    gdbarch_dump: TARGET_CHAR_SIGNED # (gdbarch_char_signed (current_gdbarch))
    gdbarch_dump: char_signed = 1
    gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL(val, msym) # (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
    gdbarch_dump: coff_make_msymbol_special = <0x934d0>
    gdbarch_dump: construct_inferior_arguments = <0x668e0>
    gdbarch_dump: convert_from_func_ptr_addr = <0x93490>
    gdbarch_dump: CONVERT_REGISTER_P(regnum, type) # (gdbarch_convert_register_p (current_gdbarch, regnum, type))
    gdbarch_dump: convert_register_p = <0x16ef00>
    gdbarch_dump: DBX_MAKE_MSYMBOL_SPECIAL(desc, msym) # (gdbarch_dbx_make_msymbol_special (current_gdbarch, desc, msym))
    gdbarch_dump: dbx_make_msymbol_special = <0x934e0>
    gdbarch_dump: DECR_PC_AFTER_BREAK # (gdbarch_decr_pc_after_break (current_gdbarch))
    gdb stack crawl at point of internal error:
    0   gdb                                 0x001368b0 _ZL17internal_vproblemP16internal_problemPKciS2_Pc + 128
    1   gdb                                 0x00136816 _Z15internal_verrorPKciS0_Pc + 38
    2   gdb                                 0x00135d0d _Z14internal_errorPKciS0_z + 29
    3   gdb                                 0x0008d41c _Z16gdbarch_addr_bitP7gdbarch + 156
    4   gdb                                 0x00139c51 _Z8paddr_nzy + 33
    5   gdb                                 0x0008aaf3 _Z12gdbarch_dumpP7gdbarchP7ui_file + 1427
    6   gdb                                 0x00092c7b _Z20gdbarch_find_by_info12gdbarch_info + 1611
    7   gdb                                 0x00093963 _Z16gdbarch_update_p12gdbarch_info + 51
    8   gdb                                 0x00093bd9 _Z31initialize_current_architecturev + 185
    9   gdb                                 0x00134d71 _Z8gdb_initPc + 81
    10  gdb                                 0x000830b3 _ZL13captured_mainPv + 1795
    11  gdb                                 0x00081a3b _Z12catch_errorsPFiPvES_PKci + 187
    12  gdb                                 0x0008299f _Z8gdb_mainP18captured_main_args + 47
    13  gdb                                 0x000025d3 main + 51
    14  gdb                                 0x00002555 start + 53
    gdbarch.sh:1863: internal-error: int gdbarch_addr_bit(struct gdbarch *): Assertion `gdbarch != NULL' failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? ([y] or n) 

(Note: I formerly had a bounty for this on BountySource, but then I deleted my BountySource account due to bad interactions with them on social media, so now if you are interested in a bounty, contact me separately to find a way to do it outside of their system)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions