guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#58971] [PATCH] gnu: Add avr-gdb.


From: Thiago Jung Bauermann
Subject: [bug#58971] [PATCH] gnu: Add avr-gdb.
Date: Fri, 04 Nov 2022 23:21:59 -0300

Hello Kristian,

Kristian Lein-Mathisen <kristianlein@gmail.com> writes:

> To be honest, I don't know why the AVR target isn't supported in the standard 
> GDB
> build and I haven't been able to figure out how to list all supported 
> targets. I'm new to GDB in
> general so
> I don't know if I'm the right person to do this writeup.

Normally GDB is built to support only one target. It's possible to make
it support more targets by passing a list of targets (or the special
“all” value) to the ‘--enable-targets’ option of its configure script.

Actually, one alternative to your patch would be to add
“--enable-targets=all” to the configure list of the regular GDB package.
I don't know why distros don't do that. IMHO it's simpler than having
different GDB packages for different architectures. The GDB binary would
get bigger, but not nearly enough that it would be a problem for today's
disks…

> However, I'm looking at https://github.com/dwtk/dwtk (which I also intend to 
> package for Guix if it's
> of interest), 
> and the standard gdb gives me a bunch of error messages when I connect to 
> dwtk's remote
> gdbserver. I'm guessing this
> incompatibility applies to all gdbservers implemented for AVR chips. I 
> haven't found much clarity of
> this in the GDB docs.
> I presume this is the reason most distros package avr-gdb separately from gdb 
> like we're doing
> here.

I think you are right. Ubuntu has a gdb-multiarch package which supports
more targets, but for some reason it doesn't support AVR and has a
separate gdb-avr package. Strange.

> I've taken the "synopsis" from Arch Linux, removed unsupported languages from 
> the description,
> and just 
> mentioned that this is for the specific AVR microcontroller architecture. 
> Please let me know if that's
> good enough.

I think your synopsis and description are good, thank you.
I hope you don't mind if I have one more suggestion: add comments to the
list of configure flags explaining why they're necessary — except for
the “--target=avr” one, which is self-explanatory :-).

Also, out of curiosity: is there a reason why you restrict the enabled
languages to C and C++? A quick search suggests that it's possible to
use Rust as well, maybe more languages?

-- 
Thanks
Thiago





reply via email to

[Prev in Thread] Current Thread [Next in Thread]