How to disable all compilation arguments for gdb compile code command?

前端 未结 2 972
梦毁少年i
梦毁少年i 2021-01-24 02:52

Following this process from an earlier question (see answer).

gdb is a huge improvement over spim, but I\'d like to use the compile code feature of gdb, to inject arbit

2条回答
  •  无人及你
    2021-01-24 03:24

    How do I prevent -m32 from being passed?

    It looks like this is the case where GDB developers thought that "GDB knows better", and didn't provide any way to override this.

    Specifically, the -m32 comes from default_gcc_target_options(), which unconditionally adds -m%d with gdb_arch_ptr_bit() as the argument.

    Short of building your own GDB or providing a GCC wrapper that strips -m32, I don't see any way to get rid of this argument.

提交回复
热议问题