unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Trying to debug assemly
@ 2019-12-17  1:22 aprekates
  2019-12-17  7:27 ` Andrew Savonichev
  2019-12-17  9:08 ` VanL
  0 siblings, 2 replies; 7+ messages in thread
From: aprekates @ 2019-12-17  1:22 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

I have a simp cpuid.s assemblied to cpuid.o and linked to create a  
cpuid executable.

In emacs i do :

M-x gdb

and i give as argument the cpuid path.

I get :

Reading symbols from 
/home/chomwitt/Programming/Assembly/Blum/code/chap04/cpuid...done.
(gdb) Undefined command: "1-inferior-tty-set".  Try "help".
(gdb) Undefined command: "2-gdb-set".  Try "help".
(gdb) Undefined command: "3-gdb-set".  Try "help".
(gdb) Undefined command: "4-enable-pretty-printing".  Try "help".
(gdb) Undefined command: "5-file-list-exec-source-files".  Try "help".
(gdb) Undefined command: "6-file-list-exec-source-file".  Try "help".
(gdb) Undefined command: "7-gdb-show".  Try "help".
(gdb) Undefined command: "8-stack-info-frame".  Try "help".
(gdb) Undefined command: "9-thread-info".  Try "help".
(gdb) Undefined command: "10-break-list".  Try "help".
(gdb) Undefined command: "11-thread-info".  Try "help".
(gdb) Undefined command: "12-break-list".  Try "help"

(gdb)

What are those lines mean? Are those warnings or bugs?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to debug assemly
  2019-12-17  1:22 Trying to debug assemly aprekates
@ 2019-12-17  7:27 ` Andrew Savonichev
  2019-12-18  2:30   ` aprekates
  2019-12-17  9:08 ` VanL
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Savonichev @ 2019-12-17  7:27 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

aprekates <aprekates@posteo.net> writes:
> I have a simp cpuid.s assemblied to cpuid.o and linked to create a  
> cpuid executable.
>
> In emacs i do :
>
> M-x gdb
>
> and i give as argument the cpuid path.
>
> I get :
>
> Reading symbols from 
> /home/chomwitt/Programming/Assembly/Blum/code/chap04/cpuid...done.
> (gdb) Undefined command: "1-inferior-tty-set".  Try "help".
> (gdb) Undefined command: "2-gdb-set".  Try "help".
>
> [...]
>
> What are those lines mean? Are those warnings or bugs?
>

M-x gdb gives you a default command `gdb -i=mi'. Make sure you don't
delete this `-i=mi' option, and just add a path to an executable:

  M-x gdb
  gdb -i=mi /path/to/cpuid

More about `-i=mi' option:
  https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html

-- 
Andrew



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to debug assemly
  2019-12-17  1:22 Trying to debug assemly aprekates
  2019-12-17  7:27 ` Andrew Savonichev
@ 2019-12-17  9:08 ` VanL
  1 sibling, 0 replies; 7+ messages in thread
From: VanL @ 2019-12-17  9:08 UTC (permalink / raw)
  To: help-gnu-emacs

aprekates <aprekates@posteo.net> writes:

> (gdb) Undefined command: "1-inferior-tty-set".  Try "help".
> (gdb) Undefined command: "2-gdb-set".  Try "help".
> (gdb) Undefined command: "3-gdb-set".  Try "help".
> (gdb) Undefined command: "4-enable-pretty-printing".  Try "help".
> (gdb) Undefined command: "5-file-list-exec-source-files".  Try "help".
> (gdb) Undefined command: "6-file-list-exec-source-file".  Try "help".
> (gdb) Undefined command: "7-gdb-show".  Try "help".
> (gdb) Undefined command: "8-stack-info-frame".  Try "help".
> (gdb) Undefined command: "9-thread-info".  Try "help".
> (gdb) Undefined command: "10-break-list".  Try "help".
> (gdb) Undefined command: "11-thread-info".  Try "help".
> (gdb) Undefined command: "12-break-list".  Try "help"
>
> (gdb)
>
> What are those lines mean? Are those warnings or bugs?

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 gdb's mumble grumble      bellyache due to 'undefine command'  hint, do this 
──────────────────────────────────────────────────────────────────────────────
 (gdb) Undefined command:  "1-inferior-tty-set".                Try "help".   
 (gdb) Undefined command:  "2-gdb-set".                         Try "help".   
 (gdb) Undefined command:  "3-gdb-set".                         Try "help".   
 (gdb) Undefined command:  "4-enable-pretty-printing".          Try "help".   
 (gdb) Undefined command:  "5-file-list-exec-source-files".     Try "help".   
 (gdb) Undefined command:  "6-file-list-exec-source-file".      Try "help".   
 (gdb) Undefined command:  "7-gdb-show".                        Try "help".   
 (gdb) Undefined command:  "8-stack-info-frame".                Try "help".   
 (gdb) Undefined command:  "9-thread-info".                     Try "help".   
 (gdb) Undefined command:  "10-break-list".                     Try "help".   
 (gdb) Undefined command:  "11-thread-info".                    Try "help".   
 (gdb) Undefined command:  "12-break-list".                     Try "help"    
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The gdb complains it has had undigestible 'undefined commands' on input feed?

And, suggests what to do about it by taiping 'help'.

-- 
VanL.
  əə0@ 一 二 三 言 語 𝔖 元 示 証 明 海 自 己 漢 本 人 Gnus/Emacs (berkeley-unix)





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to debug assemly
  2019-12-17  7:27 ` Andrew Savonichev
@ 2019-12-18  2:30   ` aprekates
  2019-12-18  8:39     ` tomas
  0 siblings, 1 reply; 7+ messages in thread
From: aprekates @ 2019-12-18  2:30 UTC (permalink / raw)
  To: Andrew Savonichev, Help Gnu Emacs mailing list

Thanks.

That worked. Although i dont quite understand what is the /GDB/MI 
interface./

I  also enabled the option : GUD / GDB-MI / Display other windows

If i dont do that the other windows like breakpoints,registers etc wont 
close when i give the gdb> quit but i have to M-x kill-buffer each one.

Alexandros

On 17/12/19 9:27 π.μ., Andrew Savonichev wrote:
> aprekates <aprekates@posteo.net> writes:
>> I have a simp cpuid.s assemblied to cpuid.o and linked to create a
>> cpuid executable.
>>
>> In emacs i do :
>>
>> M-x gdb
>>
>> and i give as argument the cpuid path.
>>
>> I get :
>>
>> Reading symbols from
>> /home/chomwitt/Programming/Assembly/Blum/code/chap04/cpuid...done.
>> (gdb) Undefined command: "1-inferior-tty-set".  Try "help".
>> (gdb) Undefined command: "2-gdb-set".  Try "help".
>>
>> [...]
>>
>> What are those lines mean? Are those warnings or bugs?
>>
> M-x gdb gives you a default command `gdb -i=mi'. Make sure you don't
> delete this `-i=mi' option, and just add a path to an executable:
>
>    M-x gdb
>    gdb -i=mi /path/to/cpuid
>
> More about `-i=mi' option:
>    https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to debug assemly
  2019-12-18  2:30   ` aprekates
@ 2019-12-18  8:39     ` tomas
  2019-12-19  0:38       ` aprekates
  0 siblings, 1 reply; 7+ messages in thread
From: tomas @ 2019-12-18  8:39 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

On Wed, Dec 18, 2019 at 04:30:38AM +0200, aprekates wrote:
> Thanks.
> 
> That worked. Although i dont quite understand what is the /GDB/MI
> interface./

GDB/MI is the so-called "machine interface". Back Then (TM), GDB was
just an interactive program: you type in things, GDB displays things
to you. With time, more-or-less graphical front ends appeared (among
them, of course, something written in Emacs). It became clear that
the interactive user interface wasn't the ideal way for a program to
control GDB, and thus MI was born.

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to debug assemly
  2019-12-18  8:39     ` tomas
@ 2019-12-19  0:38       ` aprekates
  2019-12-19  1:18         ` aprekates
  0 siblings, 1 reply; 7+ messages in thread
From: aprekates @ 2019-12-19  0:38 UTC (permalink / raw)
  To: tomas, help-gnu-emacs

Thanks.

So if i want to debug in emacs with gdb and have ide like functionality 
, giving me the ability to create breakpoint by clicking next to source 
lines or windows with updates on variables, registers , memory region 
etc then gdb must be able ta accept 'machine' like commands from the 
emacs gdb frontent.

Alexandros.

GDB/MI

On 18/12/19 10:39 π.μ., tomas@tuxteam.de wrote:
> On Wed, Dec 18, 2019 at 04:30:38AM +0200, aprekates wrote:
>> Thanks.
>>
>> That worked. Although i dont quite understand what is the /GDB/MI
>> interface./
> GDB/MI is the so-called "machine interface". Back Then (TM), GDB was
> just an interactive program: you type in things, GDB displays things
> to you. With time, more-or-less graphical front ends appeared (among
> them, of course, something written in Emacs). It became clear that
> the interactive user interface wasn't the ideal way for a program to
> control GDB, and thus MI was born.
>
> Cheers
> -- t



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trying to debug assemly
  2019-12-19  0:38       ` aprekates
@ 2019-12-19  1:18         ` aprekates
  0 siblings, 0 replies; 7+ messages in thread
From: aprekates @ 2019-12-19  1:18 UTC (permalink / raw)
  To: tomas, help-gnu-emacs

|||I've learned about three ways to initiate a debugging session in  
emacs with gdb.|

||a.  M-x gud-gdb||

|||b.  M-x gdb|

|c.  M-x gdb  --interpreter=mi
|

|Does option a. uses GDB/MI interface?|

|Alexandros.
|

||

||

On 19/12/19 2:38 π.μ., aprekates wrote:

> Thanks.
>
> So if i want to debug in emacs with gdb and have ide like 
> functionality , giving me the ability to create breakpoint by clicking 
> next to source lines or windows with updates on variables, registers , 
> memory region etc then gdb must be able ta accept 'machine' like 
> commands from the emacs gdb frontent.
>
> Alexandros.
>
> GDB/MI
>
> On 18/12/19 10:39 π.μ., tomas@tuxteam.de wrote:
>> On Wed, Dec 18, 2019 at 04:30:38AM +0200, aprekates wrote:
>>> Thanks.
>>>
>>> That worked. Although i dont quite understand what is the /GDB/MI
>>> interface./
>> GDB/MI is the so-called "machine interface". Back Then (TM), GDB was
>> just an interactive program: you type in things, GDB displays things
>> to you. With time, more-or-less graphical front ends appeared (among
>> them, of course, something written in Emacs). It became clear that
>> the interactive user interface wasn't the ideal way for a program to
>> control GDB, and thus MI was born.
>>
>> Cheers
>> -- t
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-19  1:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-17  1:22 Trying to debug assemly aprekates
2019-12-17  7:27 ` Andrew Savonichev
2019-12-18  2:30   ` aprekates
2019-12-18  8:39     ` tomas
2019-12-19  0:38       ` aprekates
2019-12-19  1:18         ` aprekates
2019-12-17  9:08 ` VanL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).