From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stafford Horne Date: Thu, 21 Oct 2021 06:17:05 +0900 Subject: [OpenRISC] [PATCH 1/5] gdb: or1k: implement gdb server In-Reply-To: <87mtn3vbwq.fsf@tromey.com> References: <20210913124800.471680-1-shorne@gmail.com> <20210913124800.471680-2-shorne@gmail.com> <87mtn3vbwq.fsf@tromey.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On Wed, Oct 20, 2021 at 11:33:41AM -0600, Tom Tromey wrote: > >>>>> ">" == Stafford Horne via Gdb-patches 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. Right, I will update that before pushing. > >> +/* 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. I agree. -Stafford