apply patch to avr-gdb to be able to debug on assembler level

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

apply patch to avr-gdb to be able to debug on assembler level

Klaus Rudolph
Hi,

I today run into a well known problem with avr-gdb.
There is already a patch provided within the bug report.


https://sourceware.org/bugzilla/show_bug.cgi?id=13519

Can someone please commit that patch to the current gdb sources please?
I checked the patch against gdb 9.1 for some minutes and it looks
perfect, even after 8 years :-). It is only a 4 line patch and local to avr.

Would be nice to see the patch going into the trunk/master.

Without the patch it is impossible to debug on assembler level with avr.
A very basic feature I believe :-).

Regards
  Klaus
Reply | Threaded
Open this post in threaded view
|

Re: apply patch to avr-gdb to be able to debug on assembler level

Sourceware - gdb list mailing list
On Fri, May 22, 2020 at 4:06 PM Klaus Rudolph <[hidden email]> wrote:

> Hi,
>
> I today run into a well known problem with avr-gdb.
> There is already a patch provided within the bug report.
>
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=13519
>

Indeed, the curious case of the apparently straight-forward fix that hasn't
been applied.  Is there actually a maintainer for the AVR port?

On the flip side this bug forced me to figure out how to patch and build
avr-gdb myself.
Reply | Threaded
Open this post in threaded view
|

Re: apply patch to avr-gdb to be able to debug on assembler level

Simon Marchi-4
On 2020-05-22 12:39 p.m., Christo Crause via Gdb wrote:

> On Fri, May 22, 2020 at 4:06 PM Klaus Rudolph <[hidden email]> wrote:
>
>> Hi,
>>
>> I today run into a well known problem with avr-gdb.
>> There is already a patch provided within the bug report.
>>
>>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=13519
>>
>
> Indeed, the curious case of the apparently straight-forward fix that hasn't
> been applied.  Is there actually a maintainer for the AVR port?
>
> On the flip side this bug forced me to figure out how to patch and build
> avr-gdb myself.
>

Hi,

I saw the activity on the bug report yesterday.  It's unfortunate, but if you
want something to progress, you just need to ping it now and then, otherwise
it just gets buried in the volume of emails and patches.  If the patch was sent
in 2016 and hasn't seen any activity since, there's no real change that some
GDB maintainer will pick it up, review it, test it and merge it out of nowhere
(unless they need it themselves).

And indeed, there's isn't a maintainer dedicated to AVR in GDB, so that doesn't
help.

I would like to see this merged, so I'm working on getting at least a bit of the
GDB testsuite running against simavr.  If that works well enough, at least we'll
get some confidence that this change doesn't break some other use case.

Simon
Reply | Threaded
Open this post in threaded view
|

Re: apply patch to avr-gdb to be able to debug on assembler level

Sourceware - gdb list mailing list
On Fri, 22 May 2020, 19:25 Simon Marchi, <[hidden email]> wrote:

> I would like to see this merged, so I'm working on getting at least a bit
> of the
> GDB testsuite running against simavr.  If that works well enough, at least
> we'll
> get some confidence that this change doesn't break some other use case.
>
> Simon
>

Thank you for efforts Simon!

>
Reply | Threaded
Open this post in threaded view
|

Re: apply patch to avr-gdb to be able to debug on assembler level

Klaus Rudolph
In reply to this post by Simon Marchi-4
Am 22.05.20 um 19:25 schrieb Simon Marchi:

>
> I saw the activity on the bug report yesterday.  It's unfortunate, but if you
> want something to progress, you just need to ping it now

Thats why I wrote my mail. I also see that we had some comment on that
patch yesterday. It is simply by accident that I run into the very old
bug today and find that old bug entry. I found it, because I applied
these patches for years again and again to every new gdb version and had
a notice on my patching script for that bug.

> If the patch was sent
> in 2016 and hasn't seen any activity since, there's no real change that some
> GDB maintainer will pick it up, review it, test it and merge it out of nowhere
> (unless they need it themselves).
>
> And indeed, there's isn't a maintainer dedicated to AVR in GDB, so that doesn't
> help.
>

As always in open source, if there is nobody actively self working on
something, nothing will change. No problem!


> I would like to see this merged, so I'm working on getting at least a bit of the
> GDB testsuite running against simavr.  If that works well enough, at least we'll
> get some confidence that this change doesn't break some other use case.
>

I believe we have a bit confidence on the older patch which was working
for years very well. As I applied that patch today against 9.1 release
and get everything working, it feels ok to apply it to the mainline.
Even if it will break something, we will have some user reports for that
and maybe the next patch. But simply doing nothing because maybe
something can be broken did also not help. As mentioned, the patch is
local to avr. It can be tested with simulavr as with real jtag
interface. Testability is not a problem in that case.

It only makes me wonder that all people simply apply the patches by them
self and nobody is crying to get it in the next release :-)

Maybe avr is dead as all the arm stuff has taken over the small 8 bit
systems. And for me it is only a small project which I want to run
today... but keeps me searching for old bugs :-)

If I can support something, maybe for testing, feel free to ask.


  Klaus


Reply | Threaded
Open this post in threaded view
|

Re: apply patch to avr-gdb to be able to debug on assembler level

Sourceware - gdb list mailing list
On Fri, May 22, 2020 at 9:11 PM Klaus <[hidden email]> wrote:

>
> It only makes me wonder that all people simply apply the patches by them
> self and nobody is crying to get it in the next release :-)
>

Have been wondering about this myself since I encountered this bug and
patch probably around 3-4 years ago. To me it seemed relatively easy to
implement the fix (even though I'm not really a C programmer) and the issue
has been reported already (apparently in the correct manner), so I didn't
bother pushing for inclusion of the fix.

The other possibility is that people using official software such as Atmel
Studio or MPLab are indirectly using either different debuggers or
different debugging techniques (via the IDE) so completely avoid the issue.
I have followed AVRFreaks for quite a few years now and even there the
complaints about this bug is really few and far between.  Perhaps avr-gdb
is simply not used that widely?
Reply | Threaded
Open this post in threaded view
|

Re: apply patch to avr-gdb to be able to debug on assembler level

Simon Marchi-4
In reply to this post by Simon Marchi-4
On 2020-05-22 1:25 p.m., Simon Marchi wrote:
> I would like to see this merged, so I'm working on getting at least a bit of the
> GDB testsuite running against simavr.  If that works well enough, at least we'll
> get some confidence that this change doesn't break some other use case.

Sent here:

https://sourceware.org/pipermail/gdb-patches/2020-May/168939.html

Simon