Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdbarch is NULL when it shouldn't be #1

Open
cooljeanius opened this issue Jan 21, 2018 · 2 comments
Open

gdbarch is NULL when it shouldn't be #1

cooljeanius opened this issue Jan 21, 2018 · 2 comments

Comments

@cooljeanius
Copy link
Owner

cooljeanius commented Jan 21, 2018

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)

@cooljeanius cooljeanius changed the title gdbarch is NULL when it shouldn't be gdbarch is NULL when it shouldn't be [$15] Feb 20, 2018
@cooljeanius cooljeanius changed the title gdbarch is NULL when it shouldn't be [$15] gdbarch is NULL when it shouldn't be May 25, 2021
@cooljeanius
Copy link
Owner Author

cooljeanius commented Jan 5, 2023

of course, I can't even get to this error anymore due to the build failing earlier on... (at different points depending on compiler; in gdbserver with clang, and with issue #8 with gcc)

@cooljeanius
Copy link
Owner Author

dnwbcbftf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant