Subject: bug#69289: 30.0.50; target warnings with gdb mode using gdb 13.2 + arm-cm4

From: Yuri D'Elia <[email-masked]>
Date: Tue, 20 Feb 2024 19:21:07 +0100

I'm debugging an arm core m4 target with gdb 13.2. When debugging 
this
target under `gdb' it spews the following warning:

  warning: Invalid state, unable to determine sp alias, assuming 
  msp.

This happens at every prompt, usually multiple times, in the main 
gdb
inferior buffer, making debugging pretty annoying as it breaks the
prompt:

  (gdb) warning: Invalid state, unable to determine sp alias, 
  assuming msp.
  warning: Invalid state, unable to determine sp alias, assuming 
  msp.
  warning: Invalid state, unable to determine sp alias, assuming 
  msp.

When I use gud-gdb instead there is no warning, but I loose some
functionality I wish I could use in gdb-mi.

Searching through gdb's source it seems that this warning is 
hardcoded,
but I have no clue exactly what command is being issue to cause 
it. When
I debug through gdb's prompt (without emacs) I actually can't see 
it.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, 
cairo
 version 1.18.0, Xaw scroll bars) of 2024-02-20 built on t14g2
Repository revision: a1cbc4d810bc1b525fa46b23249b414c1ad6b031
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101011
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --with-x-toolkit=lucid --with-native-compilation=aot
 --without-gsettings --with-small-ja-dic 'CFLAGS=-O3 -flto 
 -march=native
 -pipe ' 'LDFLAGS=-fuse-ld=mold -flto''
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG JSON 
LCMS2
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY 
INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF 
TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM LUCID ZLIB
Important settings:
  value of $LC_COLLATE: C
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LANG: en_DK.UTF-8
  locale-coding-system: utf-8-unix