Subject: Re: bug#31918: 25.3; gud inserts invalid gdb commands

From: Eli Zaretskii <[email-masked]>
Date: Sat, 23 Jun 2018 18:14:27 +0300

> From: Moritz Wilhelmy <[email-masked]>
> Date: Sat, 23 Jun 2018 17:05:41 +0200
> 
> $ exec ${BR}/output/host/usr/bin/arm-buildroot-linux-musleabi-gdb
> GNU gdb (GDB) 7.10.1
> Copyright (C) 2015 Free Software Foundation, Inc.
> ...
> This GDB was configured as "--host=x86_64-pc-linux-gnu --target=arm-buildroot-linux-musleabi".
> ...
> (gdb) show configuration
> This GDB was configured as follows:
>    configure --host=x86_64-pc-linux-gnu --target=arm-buildroot-linux-musleabi
>              --with-auto-load-dir=$debugdir:$datadir/auto-load
>              --with-auto-load-safe-path=$debugdir:$datadir/auto-load
>              --with-expat
>              --with-gdb-datadir=/home/mw/src/FAME/miro-service.buildroot/output/host/usr/share/gdb (relocatable)
>              --with-jit-reader-dir=/home/mw/src/FAME/miro-service.buildroot/output/host/usr/lib/gdb (relocatable)
>              --without-libunwind-ia64
>              --with-lzma
>              --without-guile
>              --with-separate-debug-dir=/home/mw/src/FAME/miro-service.buildroot/output/host/usr/lib/debug (relocatable)
>              --without-babeltrace
> 
> ("Relocatable" means the directory can be moved with the GDB installation
> tree, and GDB will still find it.)
> (gdb)
> 
> Is there a minimum required gdb version for gdb-mi to work correctly?

GDB 7.0, AFAIK.  But it's possible that some features need a newer
GDB.

If you invoke GDB from the shell with -i=mi, can you reproduce the
problem?

Also, do these commands appear in "info break" output right after you
define the breakpoint, or do you need the breakpoint to break a few
times before that happens?