[PATCH 1/5] gdb: or1k: implement gdb server

Tom Tromey tom@tromey.com
Wed Oct 20 17:33:41 GMT 2021


>>>>> ">" == Stafford Horne via Gdb-patches <gdb-patches@sourceware.org> writes:

>> This patch adds gdbserver support for OpenRISC.  This has been used for
>> debugging the glibc port that in being worked on here:

>>   https://github.com/openrisc/or1k-glibc/tree/or1k-port-2

>> Hence the comment about registers definitions being inline with glibc.

Thanks for the patch.  I had one minor comment.

>> +#define or1k_breakpoint_len 4

>> +bool
>> +or1k_target::low_breakpoint_at (CORE_ADDR where)
>> +{
>> +  unsigned int insn;
>> +
>> +  read_memory (where, (unsigned char *) &insn, 4);

Perhaps this ought to use or1k_breakpoint_len here.

>> +/* Fetch the thread-local storage pointer for libthread_db.  */
>> +
>> +ps_err_e
>> +ps_get_thread_area (struct ps_prochandle *ph,
>> +		    lwpid_t lwpid, int idx, void **base)
>> +{

Not your problem but it seems like a shame that this exact
implementation is repeated several times in gdbserver.

Tom


More information about the Gdb-patches mailing list