[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(
From: |
Paul Schlie |
Subject: |
Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(...) bug fix (for more recent gdb versions) |
Date: |
Tue, 19 Oct 2004 12:48:58 -0400 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
I'm using Mac OSX with the latest development versions of gnu tools, and
choose to try the "old" C version to avoid some Linux communication
socket/port dependencies which seem to be present in simulavrxx from
reviewing the mail-list, and wanted to try to keep things simpler by not
having to deal initially with potential C++ coding/debug issues.
(personally, I think it would be a good idea to continue to support and
maintain simulavr, and possibly not think of it as "old" code, but rather as
the parent C implementation, as I don't see any good reason to abandon it in
favor of simulavrxx requiring C++ at the moment)
- are there any fixes in simulavrxx which have not been back-ported yet to
simulavr which would be helpful?
- it also may be a good idea to contribute simulavr to the gdb/binutils cvs
development branch, to enable gcc/binutils/gdb/etc. bug reporting and
verification via target simulation to proceed more easily to the benefit of
those interested in gnu avr tools.
Thanks, -paul-
> From: Klaus Rudolph <address@hidden>
> Date: Tue, 19 Oct 2004 10:33:15 +0200 (MEST)
> To: Frost_Tobias <address@hidden>
> Cc: <address@hidden>
> Subject: Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu
> m(...) bug fix (for more recent gdb versions)
>
> Hi,
>
> yes I accepted the patch allready, thanks that you give me enough time
> to drink some cups of coffee :-)
>
> I will check in the changes next days for simulavrxx.
> I actually not working on the old simulavr but I could do the change if
> someone is using the old version...
>
> Bye
> Klaus
>
>
>
>> No, the patch's correct.
>> Num will be shifted by 4 every time the while is executed and then stored.
>> Then the low nibble will be ored into num
>>
>> Example:
>>
>> *p = ABCDEF
>>
>> will be: (each line is one while-execution)
>>
>> num
>> 0x0000 000A
>> 0x0000 00AB
>> 0x0000 0ABC
>> 0x0000 ABCD
>> 0x000A BCDE
>> 0x00AB CDEF
>>
>> num = (num << (i * 4)) | hex2nib (*p); (replaced by following line) */
>>
>> without the patch you'll get:
>>
>> (i=0) -> no shift 0x0000 000A
>> (i=1 -> shifted with 4) -> num = 0x0000 00A0 | 0x0B -> num = 0x0000
>> 00AB
>> (i=2 -> num shifted with 8) -> num = 0x0000 AB00 | 0x0C -> num = 0x0000
>> AB0C
>> (ERROR!)
>>
>>
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Klaus Rudolph [mailto:address@hidden
>> Gesendet: Montag, 18. Oktober 2004 17:16
>> An: address@hidden
>> Betreff: [Simulavr-devel] [patch #3453] gdbserver.c
>> gdb_extract_hex_num(...) bug fix (for more recent gdb versions)
>>
>>
>> This mail is an automated notification from the patch tracker
>> of the project: Simulavr: an AVR simulator.
>>
>>
> /**************************************************************************/
>> [patch #3453] Latest Modifications:
>>
>> Changes by:
>> Klaus Rudolph <address@hidden>
>> 'Date:
>> Mon 18.10.2004 at 15:07 (Europe/Berlin)
>>
>> ------------------ Additional Follow-up Comments
>> ----------------------------
>> Can you give me an idea what problem the patch should fix?
>>
>> Your new line:
>> num = (num << 4) | hex2nib (*p);
>> could never work I think. This will always change
>> the "0000000X0" position but nothing else!?.
>> If the tranmitted var is longer you have to change
>> the init of max_shifts but that is not done....
>>
>> maybe I am totally confused today, but please let us know
>> what your problem is.
>>
>> Why you have not send a patch file as patch?
>>
>>
>>
>>
>>
>>
>>
>>
> /**************************************************************************/
>> [patch #3453] Full Item Snapshot:
>>
>> URL: <http://savannah.nongnu.org/patch/?func=detailitem&item_id=3453>
>> Project: Simulavr: an AVR simulator
>> Submitted by: Paul Schlie
>> On: Mon 18.10.2004 at 12:48
>>
>> Category: bug fix
>> Priority: 9 - Immediate
>> Resolution: None
>> Privacy: Public
>> Assigned to: None
>> Originator Email:
>> Status: Open
>>
>>
>> Summary: gdbserver.c gdb_extract_hex_num(...) bug fix (for more recent
>> gdb
>> versions)
>>
>> Original Submission: static int
>> gdb_extract_hex_num (char **pkt, char stop)
>> {
>> int i = 0;
>> int num = 0;
>> char *p = *pkt;
>> int max_shifts = sizeof (int) * 2 - 1; /* max number of nibbles to
>> shift
>> through */
>>
>> while ((*p != stop) && (*p != ''))
>> {
>> if (i > max_shifts)
>> avr_error ("number too large");
>>
>> /* This is broken for values encoded with greater than two hex digits,
>> which
>> is typical in gdb sessions when leading 0's are encoded for integer
>> values
>> num = (num << (i * 4)) | hex2nib (*p); (replaced by following
>> line)
>> */
>> num = (num << 4) | hex2nib (*p);
>> i++;
>> p++;
>> }
>>
>> *pkt = p;
>> return num;
>> }
>>
>>
>> Follow-up Comments
>> ------------------
>>
>>
>> -------------------------------------------------------
>> Date: Mon 18.10.2004 at 15:07 By: Klaus Rudolph <zfrdh>
>> Can you give me an idea what problem the patch should fix?
>>
>> Your new line:
>> num = (num << 4) | hex2nib (*p);
>> could never work I think. This will always change
>> the "0000000X0" position but nothing else!?.
>> If the tranmitted var is longer you have to change
>> the init of max_shifts but that is not done....
>>
>> maybe I am totally confused today, but please let us know
>> what your problem is.
>>
>> Why you have not send a patch file as patch?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> For detailed info, follow this link:
>> <http://savannah.nongnu.org/patch/?func=detailitem&item_id=3453>
>>
>> _______________________________________________
>> Message sent via/by Savannah
>> http://savannah.nongnu.org/
>>
>>
>>
>>
>>
>> _______________________________________________
>> Simulavr-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/simulavr-devel
>>
>>
>> _______________________________________________
>> Simulavr-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/simulavr-devel
>>
>
> --
> +++ GMX DSL Premiumtarife 3 Monate gratis* + WLAN-Router 0,- EUR* +++
> Clevere DSL-Nutzer wechseln jetzt zu GMX: http://www.gmx.net/de/go/dsl
>
>
>
> _______________________________________________
> Simulavr-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/simulavr-devel
- AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(...) bug fix (for more recent gdb versions), Frost_Tobias, 2004/10/19
- Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(...) bug fix (for more recent gdb versions), Klaus Rudolph, 2004/10/19
- Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(...) bug fix (for more recent gdb versions),
Paul Schlie <=
- Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(...) bug fix (for more recent gdb versions), Klaus Rudolph, 2004/10/20
- Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(...) bug fix (for more recent gdb versions), E. Weddington, 2004/10/20
- [Simulavr-devel] Windows port of simulavrxx, Klaus Rudolph, 2004/10/20
- Re: [Simulavr-devel] Windows port of simulavrxx, Bill, 2004/10/21
- Re: [Simulavr-devel] Windows port of simulavrxx, E. Weddington, 2004/10/22
- Re: [Simulavr-devel] Windows port of simulavrxx, Bill, 2004/10/22
- Re: [Simulavr-devel] Windows port of simulavrxx, E. Weddington, 2004/10/22
- Re: [Simulavr-devel] Windows port of simulavrxx, Bill, 2004/10/22
Re: AW: [Simulavr-devel] [patch #3453] gdbserver.c gdb_extract_hex_nu m(...) bug fix (for more recent gdb versions), Paul Schlie, 2004/10/19