This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 1/3] RISC-V/Linux/native: Determine FLEN dynamically
- From: "Maciej W. Rozycki" <macro at wdc dot com>
- To: Jim Wilson <jimw at sifive dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Andrew Burgess <andrew dot burgess at embecosm dot com>, Palmer Dabbelt <palmer at dabbelt dot com>, Tom Tromey <tom at tromey dot com>, "guoren at kernel dot org" <guoren at kernel dot org>, "lifang_xia at c-sky dot com" <lifang_xia at c-sky dot com>, "yunhai_shang at c-sky dot com" <yunhai_shang at c-sky dot com>, "jiangshuai_li at c-sky dot com" <jiangshuai_li at c-sky dot com>
- Date: Fri, 31 Jan 2020 10:43:16 +0000 (GMT)
- Subject: Re: [PATCH v2 1/3] RISC-V/Linux/native: Determine FLEN dynamically
- Ironport-sdr: kMwMf62BWqxihPfZYfyz94j+U71IDEQTITfXxEsCaFp9GePtvi1WCjqjyGXBU6Fdn9e0MB/Is6 SwKvYxPgYgMmfMlFvJ9J+GXsEQbeUUNVdr2ek4X0LRcAyTuaXiflziuyhTKGNmmRc3KdJc/uiD yQStWwCyWA4KGen9ALgi2O1JfjEwLYIGLQtlonFUnahTAworgoCog7ekwLZ5QblfDlhM6q6H4y t15sLWKMxrj5wDHBhlgknPhvrlbKktVn0VuFLhc2IlJkqQPJkQOJpXMnwPDGyK6DrUi/DWhLIF slE=
- Ironport-sdr: OyPInC/IlgvSJG+Bjv/RuqXTGNqcDuHeWhu1Nm9Q5O3d1F1bQgy9DnvbfmM+OmkSYBKimx1hWu eEa2OpGlW5csZ8QpXl84JWM8spmcOj5MgD/YfvXNLIa8J/jtBdriPHohvu2rAMNuDwPHdGc5dJ vnxk9RnmnYgDAZZN8fc3RI9yY7cTHUGhOFLzqN7JfAvfoVZ6KtFIZkDxV7pybwrDkKg9plZ2gE 7KKHIpoxZbZF6AP97OIo1+5sQ/k0cxxAx10Ymyy6PypxX0qKLAzd0XR/Uv0CbbNQ8I7QwmEf/3 on5AGE4dh7GxR4/HmlRTWpCg
- Ironport-sdr: Z4E9Xrply45fcIzXEENqRIPpTmN6flmMt29pCAopK7TD5AqBX/fgN/UiSm3KK+Y9UbsSw6f7KR nLZs4nT+MUKghVjpbG9Us1RA/Q2W+VxBBx+/c2ffmeo3acKcGuIUK7C1t1H6i62IIo6ySAGRz6 +vS5b37NP+BKOTQnYze7Hm3VqD6nQVXvCQxLEKtyVs7MEAsxAOtDsIiFLqRsrOlVcYNEME9DUP PPQXrnM41x67VukpdmJ4pCYHotSaXHq6ZExrbc2++z/J+jEu8WqhaK2fGKRI/rv7VGuLEd+0Lg NtM=
- References: <alpine.LFD.2.21.2001291207310.14118@redsun52.ssa.fujisawa.hgst.com> <alpine.LFD.2.21.2001291410310.14118@redsun52.ssa.fujisawa.hgst.com> <CAFyWVaamCunsoOxs_NZWbi75TJZiuuboTcV8siLXUiiOxWJOqA@mail.gmail.com>
- Wdcironportexception: Internal
On Thu, 30 Jan 2020, Jim Wilson wrote:
> > We can do better however and not rely on any particular value of FLEN
> > and probe for it dynamically, by observing that the PTRACE_GETREGSET
> > ptrace(2) call will only accept an exact regset size, and that will
> > reflect FLEN.
>
> I forgot to mention this before, but our long term plans are to pass
> info via the auxiliary vector from the kernel to the application, and
> then in theory gdb should be able to get architecture info from there.
Thanks for the heads-up. This will undoubtedly be useful for something,
but I think we have a solution for GDB/gdbserver already, so unless the
circumstances change, I think we're fine without the need to peek at the
auxv.
I'll be posting v3, which has just passed testing, right away. It
includes a few further improvements beyond what has been already
discussed.
Maciej