From 3d2a80cbf0be8e0914fc8982423b53f5dc0c0890 Mon Sep 17 00:00:00 2001 From: wennmach Date: Wed, 16 Jul 2003 22:11:31 +0000 Subject: GNU Debugger GDB, configured for Atmel AVR microcontroller targets. Submitted by Karl Janmar in PR 22139, with only minor changes by myself. Original package from FreeBSD. --- cross/avr-gdb/DESCR | 5 +++++ cross/avr-gdb/Makefile | 23 +++++++++++++++++++++++ cross/avr-gdb/PLIST | 2 ++ cross/avr-gdb/distinfo | 4 ++++ cross/avr-gdb/patches/patch-aa | 24 ++++++++++++++++++++++++ 5 files changed, 58 insertions(+) create mode 100644 cross/avr-gdb/DESCR create mode 100644 cross/avr-gdb/Makefile create mode 100644 cross/avr-gdb/PLIST create mode 100644 cross/avr-gdb/distinfo create mode 100644 cross/avr-gdb/patches/patch-aa (limited to 'cross') 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; + } + + -- cgit v1.2.3