unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Thiago Jung Bauermann via Guix-patches via <guix-patches@gnu.org>
To: Kristian Lein-Mathisen <kristianlein@gmail.com>
Cc: mail@cbaines.net, 58971@debbugs.gnu.org
Subject: [bug#58971] [PATCH] gnu: Add avr-gdb.
Date: Fri, 04 Nov 2022 23:21:59 -0300	[thread overview]
Message-ID: <87bkpm6rgd.fsf@kolabnow.com> (raw)
In-Reply-To: <CAAGQtHz7kPXufua4atYTJXr2aQQOht-=kMRvSpLesYYG=i0d6Q@mail.gmail.com>


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	other threads:[~2022-11-05  2:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 19:49 [bug#58971] [PATCH] gnu: Add avr-gdb Kristian Lein-Mathisen
2022-11-03 17:31 ` Christopher Baines
2022-11-03 18:24   ` Kristian Lein-Mathisen
2022-11-05  2:21     ` Thiago Jung Bauermann via Guix-patches via [this message]
2022-11-07 19:59     ` Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkpm6rgd.fsf@kolabnow.com \
    --to=guix-patches@gnu.org \
    --cc=58971@debbugs.gnu.org \
    --cc=bauermann@kolabnow.com \
    --cc=kristianlein@gmail.com \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).