Package Details: msp430-elf-gdb 15.1-1

Git Clone URL: https://aur.archlinux.org/msp430-elf-gdb.git (read-only, click to copy)
Package Base: msp430-elf-gdb
Description: The GNU Debugger for the msp430-elf target.
Upstream URL: https://www.gnu.org/software/gdb/download/
Licenses: GPL
Groups: devel
Submitter: vonPalitroque
Maintainer: vonPalitroque
Last Packager: vonPalitroque
Votes: 10
Popularity: 0.001232
First Submitted: 2015-09-28 13:49 (UTC)
Last Updated: 2024-08-03 18:16 (UTC)

Latest Comments

Pezo commented on 2022-12-15 21:11 (UTC)

This doesn't build with readline 8.2 currently: https://sourceware.org/pipermail/gdb-patches/2022-March/186828.html

smallAndSimple commented on 2020-03-16 20:35 (UTC)

Oh, adding tui adds a dependency on ncurses. Still though, would something like a seperate package be an option? Or just adding ncurses as a dependency?

smallAndSimple commented on 2020-03-16 20:31 (UTC)

Hi there,

Can you enable tui by default (change --disable-tui to --enable-tui)? It does not seem to have disadvantages to me and I like tui a lot.

vonPalitroque commented on 2018-08-13 20:22 (UTC)

Greetings,

@Falkenber9, thank you very much for this. Yes, I recall this hitting the mailing list. I forgot to test whether it affected the GDB build. Thanks for reminding me. Also, thanks for reminding me I had to update the PKGBUILD to GDB 8.1.1; it was released 13 days ago [at the time of writing]. Luckily for us, the issue was fixed for the 8.1.1 release so the patch is no longer needed [1]. I have updated the PKGBUILD accordingly.

Still, thanks for the reminder and for the patch.

Cheers,

Orlando.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=863d5065467b16304f6b5c80a186e3bcc68c48a6

Falkenber9 commented on 2018-08-13 20:00 (UTC) (edited on 2018-08-13 20:06 (UTC) by Falkenber9)

Maybe it is helpful for someone else:

As a consequence of this bug I had to patch the source by the following patch: https://sourceware.org/ml/gdb-patches/2018-05/msg00863.html

python.patch
index c29e7d7a6b..89443aee25 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1667,6 +1667,14 @@ finalize_python (void *ignore)
   restore_active_ext_lang (previous_active);
 }

+#ifdef IS_PY3K
+PyMODINIT_FUNC
+PyInit__gdb (void)
+{
+  return PyModule_Create (&python_GdbModuleDef);
+}
+#endif
+
 static bool
 do_start_initialization ()
 {
@@ -1707,6 +1715,9 @@ do_start_initialization ()
      remain alive for the duration of the program's execution, so
      it is not freed after this call.  */
   Py_SetProgramName (progname_copy);
+
+  /* Define _gdb as a built-in module.  */
+  PyImport_AppendInittab ("_gdb", PyInit__gdb);
 #else
   Py_SetProgramName (progname.release ());
 #endif
@@ -1716,9 +1727,7 @@ do_start_initialization ()
   PyEval_InitThreads ();

 #ifdef IS_PY3K
-  gdb_module = PyModule_Create (&python_GdbModuleDef);
-  /* Add _gdb module to the list of known built-in modules.  */
-  _PyImport_FixupBuiltin (gdb_module, "_gdb");
+  gdb_module = PyImport_ImportModule ("_gdb");
 #else
   gdb_module = Py_InitModule ("_gdb", python_GdbMethods);
 #endif

Integrated into PKGBUILD:

PKGBUILD
# Maintainer: Orlando Arias <orlandoarias at gmail <dot> com>

_target=msp430-elf
pkgname="${_target}-gdb"
pkgver=8.1
pkgrel=2
pkgdesc="The GNU Debugger for the ${_target} target."
arch=('x86_64' 'x86')
url="https://www.gnu.org/software/gdb/download/"
license=('GPL')
groups=('devel')
depends=("python" "readline")
source=("http://ftp.gnu.org/gnu/gdb/gdb-${pkgver}.tar.xz")
sha256sums=('af61a0263858e69c5dce51eab26662ff3d2ad9aa68da9583e8143b5426be4b34')


prepare() {
  cd "$srcdir/gdb-$pkgver"
  [[ -d gdb-build ]] && rm -rf gdb-build
  mkdir gdb-build

  cd "$srcdir/gdb-$pkgver"
  patch -p1 < ../../python.patch

  # fix libiberty
  # sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure

}

build() {
  unset LDFLAGS 
  export CFLAGS="-O2 -pipe"
  export CXXFLAGS="-O2 -pipe"
  export CPPFLAGS="-O2 -pipe"

  cd "$srcdir/gdb-$pkgver/gdb-build"

  # build gdb
  ../configure \
    --prefix=/usr \
    --without-guile \
    --target=${_target} \
    --host=${CHOST} \
    --build=${CHOST} \
    --with-sysroot=/usr/${_target} \
    --disable-nls \
    --with-python=/usr/bin/python \
    --with-system-readline \
    --disable-werror \
    --disable-tui

  make
}


package() {
  cd "$srcdir/gdb-$pkgver/gdb-build"
  make DESTDIR="$pkgdir" install

  # fix conflicts
  # rm -f ${pkgdir}/usr/lib/libiberty.a
  rm -r ${pkgdir}/usr/share/info
  # rm -r ${pkgdir}/usr/{info,man}

  rm -r ${pkgdir}/usr/share/man
  rm -r ${pkgdir}/usr/share/gdb/
  rm -r ${pkgdir}/usr/include/gdb
}

# vim:set ts=2 sw=2 et:

andrewchen commented on 2015-11-28 10:12 (UTC)

Why is strip enforced?