From: Daniel Jacobowitz <drow@false.org>
To: Benjamin Benz <bbe@heise.de>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Bugfix for AVR-GDB when using Eclipse/CDT
Date: Sat, 21 Jan 2006 22:24:00 -0000 [thread overview]
Message-ID: <20060121222422.GA8088@nevyn.them.org> (raw)
In-Reply-To: <200601211922.26384.bbe@heise.de>
On Sat, Jan 21, 2006 at 07:22:26PM +0100, Benjamin Benz wrote:
> Hi,
>
> when using the gdb-port for AVR-MCUs (avr-gdb) together with eclipse (CDT) the
> following happens:
>
> An "info shared library" command is issued. In solib.c this leads to an
> error-msg because the TARGET_PTR_BIT has the value 16, which is not handled.
>
> To produce the Error without eclipse just do the following:
>
> Start an simulavr-session with:
> simulavr -g -p 1212 -d atmega16
> then open an avr-gdb and tell it:
> target remote localhost:1212
> info sharedlibrary
> this should kill the avr-gdb.
>
> Here is a small 3 line Patch, which solves this problem. The patch makes it
> possible to use avr-gdb together with eclipse.
I've checked in an alternate fix, see below. It works for my tests
on both avr and x86_64-pc-linux-gnu. Please let me know if you have
any trouble with it.
--
Daniel Jacobowitz
CodeSourcery
2006-01-21 Daniel Jacobowitz <dan@codesourcery.com>
* solib.c (info_sharedlibrary_command): Avoid internal_error.
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.82
diff -u -p -r1.82 solib.c
--- solib.c 17 Dec 2005 22:34:02 -0000 1.82
+++ solib.c 21 Jan 2006 22:11:16 -0000
@@ -698,16 +698,8 @@ info_sharedlibrary_command (char *ignore
int header_done = 0;
int addr_width;
- if (TARGET_PTR_BIT == 32)
- addr_width = 8 + 4;
- else if (TARGET_PTR_BIT == 64)
- addr_width = 16 + 4;
- else
- {
- internal_error (__FILE__, __LINE__,
- _("TARGET_PTR_BIT returned unknown size %d"),
- TARGET_PTR_BIT);
- }
+ /* "0x", a little whitespace, and two hex digits per byte of pointers. */
+ addr_width = 4 + (TARGET_PTR_BIT / 4);
update_solib_list (from_tty, 0);
next prev parent reply other threads:[~2006-01-21 22:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-21 18:21 Benjamin Benz
2006-01-21 22:24 ` Daniel Jacobowitz [this message]
2006-01-22 11:14 ` Benjamin Benz
2006-01-22 15:50 ` Daniel Jacobowitz
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060121222422.GA8088@nevyn.them.org \
--to=drow@false.org \
--cc=bbe@heise.de \
--cc=gdb-patches@sources.redhat.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox