summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwennmach <wennmach>2003-07-16 22:11:31 +0000
committerwennmach <wennmach>2003-07-16 22:11:31 +0000
commit7899b7e491fdc22540411215b15d547cc3e9206a (patch)
treed70125a0d315e6388bd1cfdbbaa80d4953299300
parent32db5f2a4dfd27fc5b5dd403fa706f0cec6cfec2 (diff)
downloadpkgsrc-7899b7e491fdc22540411215b15d547cc3e9206a.tar.gz
GNU Debugger GDB, configured for Atmel AVR microcontroller targets.
Submitted by Karl Janmar <karlj@mdstud.chalmers.se> in PR 22139, with only minor changes by myself. Original package from FreeBSD.
-rw-r--r--cross/avr-gdb/DESCR5
-rw-r--r--cross/avr-gdb/Makefile23
-rw-r--r--cross/avr-gdb/PLIST2
-rw-r--r--cross/avr-gdb/distinfo4
-rw-r--r--cross/avr-gdb/patches/patch-aa24
5 files changed, 58 insertions, 0 deletions
diff --git a/cross/avr-gdb/DESCR b/cross/avr-gdb/DESCR
new file mode 100644
index 00000000000..cc446176996
--- /dev/null
+++ b/cross/avr-gdb/DESCR
@@ -0,0 +1,5 @@
+GNU Debugger GDB, configured for Atmel AVR microcontroller targets.
+
+This debugger cannot really be used standalone, but is useful in
+connection with either AVaRICE (http://avarice.sourceforge.net/)
+or simulavr (http://www.freesoftware.fsf.org/simulavr/).
diff --git a/cross/avr-gdb/Makefile b/cross/avr-gdb/Makefile
new file mode 100644
index 00000000000..6b5845847e9
--- /dev/null
+++ b/cross/avr-gdb/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/07/16 22:11:31 wennmach Exp $
+# FreeBSD Id: ports/devel/avr-gdb/Makefile,v 1.2 2003/03/07 06:00:08 ade Exp
+
+DISTNAME= gdb-5.2.1
+PKGNAME= avr-gdb-5.2.1
+CATEGORIES= cross
+MASTER_SITES= ${MASTER_SITE_SOURCEWARE:=gdb/releases/}
+
+MAINTAINER= karlj@mdstud.chalmers.se
+COMMENT= GNU GDB 5.2.1 for Atmel AVR microcontrollers
+
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --target=avr --program-prefix=avr
+
+pre-configure:
+ cd ${WRKSRC} ; ${RM} -rf dejagnu expect sim tcl texinfo
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb \
+ ${PREFIX}/bin/${PKGNAME:C/-[^-]*$//}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/cross/avr-gdb/PLIST b/cross/avr-gdb/PLIST
new file mode 100644
index 00000000000..81567f5de73
--- /dev/null
+++ b/cross/avr-gdb/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/07/16 22:11:31 wennmach Exp $
+bin/avr-gdb
diff --git a/cross/avr-gdb/distinfo b/cross/avr-gdb/distinfo
new file mode 100644
index 00000000000..4bbc165f7e0
--- /dev/null
+++ b/cross/avr-gdb/distinfo
@@ -0,0 +1,4 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/07/16 22:11:31 wennmach Exp $
+
+MD5 (gdb-5.2.1.tar.gz) = e9766842f1bbc6c2353de1410d8c0de0
+SHA1 (patch-aa) = 0a34ad3064fb03605975d9279edf638187eb74a1
diff --git a/cross/avr-gdb/patches/patch-aa b/cross/avr-gdb/patches/patch-aa
new file mode 100644
index 00000000000..4cde547d586
--- /dev/null
+++ b/cross/avr-gdb/patches/patch-aa
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/07/16 22:11:31 wennmach Exp $
+
+Index: gdb/avr-tdep.c
+===================================================================
+RCS file: /cvs/src/src/gdb/avr-tdep.c,v
+retrieving revision 1.4
+diff -u -p -r1.4 avr-tdep.c
+--- gdb/avr-tdep.c 17 Jun 2002 23:32:27 -0000 1.4
++++ gdb/avr-tdep.c 19 Jul 2002 18:33:30 -0000
+@@ -995,7 +995,12 @@ avr_skip_prologue (CORE_ADDR pc)
+ {
+ sal = find_pc_line (func_addr, 0);
+
+- if (sal.line != 0 && sal.end < func_end)
++ /* troth/2002-70-19: For some very simple functions, gcc doesn't
++ generate a prologue and the sal.end ends up being the insn (2 bytes)
++ before func_end (the address of the next func). By adjusting
++ func_end, we can catch these functions and return the correct pc. */
++
++ if (sal.line != 0 && sal.end < (func_end-2))
+ return sal.end;
+ }
+
+