Bug 126288 - gdb-6.4 with target=avr is incompatible with eclipse / patch exists
Bug#: 126288 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P3
Resolution: FIXED Assigned To: toolchain@gentoo.org Reported By: gentoo3@hubbertz.de
Component: Development
URL: 
Summary: gdb-6.4 with target=avr is incompatible with eclipse / patch exists
Keywords:  
Status Whiteboard: 
Opened: 2006-03-15 04:48 0000
Description:   Opened: 2006-03-15 04:48 0000
gdb-6.4 is incompatible with eclipse. A patch is already available in CVS.

(see
http://www.nabble.com/Bugfix-for-AVR-GDB-when-using-Eclipse-CDT-t969000.html)


------------ PATCH ----------------

--- gdb-6.4.old/gdb/solib.c     17 Dec 2005 22:34:02 -0000      1.82
+++ gdb/gdb/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);

------------ !PATCH ----------------

------- Comment #1 From Ian Hubbertz 2006-03-15 06:51:30 0000 -------
Created an attachment (id=82213) [details]
ebuild for gdb-6.4 that includes the patch

Installation

   1. Download the attached ebuild
   2. cd /usr/local/portage
   3. tar xfvz path_to/gdb-6.4-r3_avr-patch.tgz
   4. ln -s /usr/local/portage/sys-devel/gdb /usr/local/portage/cross-avr/
   5. PKGDIR=/usr/portage/packages/cross/avr emerge -av cross-avr/gdb

Note: The two last steps are necessary, because crossdev ignores ebuilds in the
Portage-Overlay, thus it is not possible to emerge the fixed gdb with crossdev
yet.
(see Gentoo Bug #126284)

------- Comment #2 From SpanKY 2006-03-15 16:10:17 0000 -------
added to 6.4-r4, thanks for the report