all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Mecklenburg <rmecklenburg@control4.com>
To: 28309@debbugs.gnu.org
Cc: Robert Mecklenburg <rmecklenburg@control4.com>
Subject: bug#28309: gud mode fails with docker gdb
Date: Thu, 31 Aug 2017 12:54:48 -0600	[thread overview]
Message-ID: <22952.23416.854187.961382@gargle.gargle.HOWL> (raw)

I'm using "GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version

3.22.11) of 2017-03-29, modified by Debian" on Ubuntu zesty on an

Intel Xeon.



I have a docker image (with Ubuntu xenial), "Docker version

17.06.1-ce, build 874a737", in which I'm trying to run gdb.  The emacs

is running outside the docker while gdb is running inside the docker.

The docker container is called "xenial-3.0.0".  I start gdb with M-x

gdb and a command line of:



    docker exec -it xenial-3.0.0 gdb -i=mi -cd=$PWD agentgtest



The bug is that I'm getting the message:



    Error: you did not specify -i=mi on GDB's command line!



I've set (setq gdbmi-debug-mode t) and *Messages* contains:



    ...

    gdb-input: 1-inferior-tty-set /dev/pts/6

    gdb-input: 2-gdb-set height 0

    gdb-input: 3-gdb-set non-stop 1

    gdb-input: 4-enable-pretty-printing

    gdb-input: 5-file-list-exec-source-files

    gdb-input: 6-file-list-exec-source-file

    gdb-input: 7-gdb-show prompt

    gdb-input: 8-stack-info-frame

    gdb-input: 9-thread-info

    gdb-input: 10-break-list

    gdb-input: 11-thread-info

    gdb-input: 12-break-list

    Error: you did not specify -i=mi on GDB’s command line!

    C-h C-g is undefined

    Updating buffer list...done

    Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help

    ...



The *gud-exec* buffer contains:



    Current directory is /home/mecklen/c4software/3.0.0/control4/zwave
/agent/gtest/

    Error: you did not specify -i=mi on GDB's command line!

    1-inferior-tty-set /dev/pts/6

    2-gdb-set height 0

    3-gdb-set non-stop 1

    4-enable-pretty-printing

    5-file-list-exec-source-files

    6-file-list-exec-source-file

    7-gdb-show prompt

    8-stack-info-frame

    9-thread-info

    10-break-list

    11-thread-info

    12-break-list

    =thread-group-added,id="i1"

    ~"GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1\n"

    ~"Copyright (C) 2016 Free Software Foundation, Inc.\n"

    ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licen
ses/gpl.html>\nThis is free software: you are free to change and redis
tribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Ty
pe \"show copying\"\nand \"show warranty\" for details.\n"

    ~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show co
nfiguration\" for configuration details."

    ~"\nFor bug reporting instructions, please see:\n"

    ~"<http://www.gnu.org/software/gdb/bugs/>.\n"

    ~"Find the GDB manual and other documentation resources online at:
\n<http://www.gnu.org/software/gdb/documentation/>.\n"

    ~"For help, type \"help\".\n"

    ~"Type \"apropos word\" to search for commands related to \"word\"
...\n"

    =cmd-param-changed,param="demangle-style",value="gnu-v3"

    =cmd-param-changed,param="print array",value="on"

    =cmd-param-changed,param="print elements",value="20000"

    =cmd-param-changed,param="print object",value="on"

    =cmd-param-changed,param="print pretty",value="on"

    =cmd-param-changed,param="print static-members",value="off"

    =cmd-param-changed,param="print vtbl",value="on"

    =cmd-param-changed,param="mi-async",value="on"

    =cmd-param-changed,param="pagination",value="off"

    ~"TERM = xterm-256color\n"

    &"$PWD: No such file or directory.\n"

    &"agentgtest: No such file or directory.\n"

    (gdb) 

    1^done

    (gdb) 

    2^done

    (gdb) 

    3^done

    (gdb) 

    4^done

    (gdb) 

    5^done,files=[]

    (gdb) 

    6^error,msg="No symbol table is loaded.  Use the \"file\" comman
d."

    (gdb) 

    7^done,value="(gdb) "

    (gdb) 

    8^error,msg="No registers."

    (gdb) 

    9^done,threads=[]

    (gdb) 

    10^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{wid
th="7",alignment="-1",col_name="number",colhdr="Num"},{width
="14",alignment="-1",col_name="type",colhdr="Type"},{width="
4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",al
ignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alig
nment="-1",col_name="addr",colhdr="Address"},{width="40",align
ment="2",col_name="what",colhdr="What"}],body=[]}

    (gdb) 

    11^done,threads=[]

    (gdb) 

    12^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{wid
th="7",alignment="-1",col_name="number",colhdr="Num"},{width
="14",alignment="-1",col_name="type",colhdr="Type"},{width="
4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",al
ignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alig
nment="-1",col_name="addr",colhdr="Address"},{width="40",align
ment="2",col_name="what",colhdr="What"}],body=[]}

    (gdb)



The original docker image was run with:



    docker run --interactive --tty \

	--volume /home/mecklen:/home/mecklen \

	--hostname xenial-3.0.0 \

	--name xenial-3.0.0 \

	--security-opt seccomp:unconfined \

	xenial-3.0.0-builder /bin/bash



It seems as if the initial sequence of mi control commands is somehow

being echoed back to emacs and processed as input.  That makes no

sense to me, any suggestions are welcome.



BTW, I'm familiar with accessing a docker from TRAMP and using M-x gdb

that way.  I works a little better but has a different set of issues

and I'd prefer to use this approach, if possible.



Thanks in advance,

-- 

Robert Mecklenburg

rmecklenburg@control4.com






                 reply	other threads:[~2017-08-31 18:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22952.23416.854187.961382@gargle.gargle.HOWL \
    --to=rmecklenburg@control4.com \
    --cc=28309@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.