* GDB Remote protocol error codes
@ 2009-02-12 15:18 David Howells
2009-02-12 15:34 ` Jeremy Bennett
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: David Howells @ 2009-02-12 15:18 UTC (permalink / raw)
To: gdb; +Cc: dhowells, Roel Kluin
Hi,
Is there a general scheme for error reply codes ('Exx') in the GDB remote
protocol? The documentation is unclear on this point. _Some_ of the commands
mandate an errno return, but not all, and from whose set of errnos? And does
this apply to all commands?
Can the gdb.info file be updated to make this more clear please?
I need to know this so that I can fix up the error returns made by the FRV
arch gdbstub in the Linux kernel.
Thanks,
David
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: GDB Remote protocol error codes
2009-02-12 15:18 GDB Remote protocol error codes David Howells
@ 2009-02-12 15:34 ` Jeremy Bennett
2009-02-12 15:53 ` Daniel Jacobowitz
2009-02-15 22:37 ` David Howells
2 siblings, 0 replies; 6+ messages in thread
From: Jeremy Bennett @ 2009-02-12 15:34 UTC (permalink / raw)
To: David Howells; +Cc: gdb, Roel Kluin
On Thu, 2009-02-12 at 15:18 +0000, David Howells wrote:
> Hi,
>
> Is there a general scheme for error reply codes ('Exx') in the GDB remote
> protocol? The documentation is unclear on this point. _Some_ of the commands
> mandate an errno return, but not all, and from whose set of errnos? And does
> this apply to all commands?
>
> Can the gdb.info file be updated to make this more clear please?
>
> I need to know this so that I can fix up the error returns made by the FRV
> arch gdbstub in the Linux kernel.
>
Hi David,
When I looked at the various RSP dialogs a few months ago, I found the
error code values were pretty much always ignored at the client end.
I'll be submitting some updates to the GDB manuals in the near future,
but in the meantime there is information in my application note on using
RSP: http://www.embecosm.com/download/ean4.html.
HTH,
Jeremy
--
Tel: +44 (1202) 416955
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: GDB Remote protocol error codes
2009-02-12 15:18 GDB Remote protocol error codes David Howells
2009-02-12 15:34 ` Jeremy Bennett
@ 2009-02-12 15:53 ` Daniel Jacobowitz
2009-02-15 22:37 ` David Howells
2 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2009-02-12 15:53 UTC (permalink / raw)
To: David Howells; +Cc: gdb, Roel Kluin
On Thu, Feb 12, 2009 at 03:18:41PM +0000, David Howells wrote:
>
> Hi,
>
> Is there a general scheme for error reply codes ('Exx') in the GDB remote
> protocol? The documentation is unclear on this point. _Some_ of the commands
> mandate an errno return, but not all, and from whose set of errnos? And does
> this apply to all commands?
>
> Can the gdb.info file be updated to make this more clear please?
>
> I need to know this so that I can fix up the error returns made by the FRV
> arch gdbstub in the Linux kernel.
Fix up relative to what? As Jeremy said, the numbers are mostly
ignored.
Jim added protocol support for more precise errors and verbose
messages a while ago, but no one's had the interest to define error
codes; also GDB needs work to not just discard them.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: GDB Remote protocol error codes
2009-02-12 15:18 GDB Remote protocol error codes David Howells
2009-02-12 15:34 ` Jeremy Bennett
2009-02-12 15:53 ` Daniel Jacobowitz
@ 2009-02-15 22:37 ` David Howells
2009-02-15 23:26 ` Daniel Jacobowitz
2 siblings, 1 reply; 6+ messages in thread
From: David Howells @ 2009-02-15 22:37 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: dhowells, gdb, Roel Kluin
Daniel Jacobowitz <drow@false.org> wrote:
> > I need to know this so that I can fix up the error returns made by the FRV
> > arch gdbstub in the Linux kernel.
>
> Fix up relative to what? As Jeremy said, the numbers are mostly
> ignored.
I've been given a patch by Roel Kluin to fix the error numbers generated by
the GDB stub in the FRV arch of the Linux kernel, but I've no real idea if
what the patch does is correct, or whether what's there already is correct, or
if neither is correct.
Even if GDB currently ignores the codes, it would be good to have a definition
of what they *ought* to be, so should gdb be fixed to make use of them at
sometime in the future, the kernel will be already correct.
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GDB Remote protocol error codes
2009-02-15 22:37 ` David Howells
@ 2009-02-15 23:26 ` Daniel Jacobowitz
2009-02-16 9:10 ` roel kluin
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2009-02-15 23:26 UTC (permalink / raw)
To: David Howells; +Cc: gdb, Roel Kluin
On Sun, Feb 15, 2009 at 10:37:10PM +0000, David Howells wrote:
> Even if GDB currently ignores the codes, it would be good to have a definition
> of what they *ought* to be, so should gdb be fixed to make use of them at
> sometime in the future, the kernel will be already correct.
It is basically impossible to do so without following the route Jim
Blandy took: a replacement error syntax. Existing stubs use them
wildly inconsistently.
I'd need to see a description of what problem the patch you received
was fixing to say more - but I can't think of a place where GDB
changes behavior based on which number follows "E".
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GDB Remote protocol error codes
2009-02-15 23:26 ` Daniel Jacobowitz
@ 2009-02-16 9:10 ` roel kluin
0 siblings, 0 replies; 6+ messages in thread
From: roel kluin @ 2009-02-16 9:10 UTC (permalink / raw)
To: David Howells, gdb, Roel Kluin
2009/2/16 Daniel Jacobowitz <drow@false.org>:
> On Sun, Feb 15, 2009 at 10:37:10PM +0000, David Howells wrote:
>> Even if GDB currently ignores the codes, it would be good to have a definition
>> of what they *ought* to be, so should gdb be fixed to make use of them at
>> sometime in the future, the kernel will be already correct.
>
> It is basically impossible to do so without following the route Jim
> Blandy took: a replacement error syntax. Existing stubs use them
> wildly inconsistently.
>
> I'd need to see a description of what problem the patch you received
> was fixing to say more - but I can't think of a place where GDB
> changes behavior based on which number follows "E".
There was no problem, I thought it looked odd and that's why I pointed
to it. Maybe we should drop the patch.
Roel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-16 9:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-12 15:18 GDB Remote protocol error codes David Howells
2009-02-12 15:34 ` Jeremy Bennett
2009-02-12 15:53 ` Daniel Jacobowitz
2009-02-15 22:37 ` David Howells
2009-02-15 23:26 ` Daniel Jacobowitz
2009-02-16 9:10 ` roel kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox