all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vladimir Ulyanov <thedieselspaceship@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: 'error in process filter: Variable binding depth exceeds max-specpdl-size' on gdb-display-memory-buffer
Date: Mon, 29 Oct 2012 14:54:34 +0200	[thread overview]
Message-ID: <CABA4b_11zPD=nmLM6w8h3WX4BOya6835LZMOBc4rc-DYRB=FxQ@mail.gmail.com> (raw)

Hello Gentlemen,

Today I was debugging my helloworld code. Launched gdb (M-x gdb then
M-x gdb-many-windows), opened memory buffer (M-x
gdb-display-memory-buffer), breaked _start, ran and did several si
commands.
 after setting breakpoint to _start section of my assembly code the
error message 'error in process filter: Variable binding depth exceeds
max-specpdl-size' apears and the memory buffer is empty.
Please look at the screenshot here: http://ompldr.org/vZzJkeQ.

Emacs version:

emacs --version
GNU Emacs 24.2.1

Assembly 'hello world' code:

; build using these commands:
; nasm -f elf -g -F stabs eatsyscall.asm
; ld -o eatsyscall eatsyscall.o

SECTION .data       ; section containing initialized data

EatMsg: db "Eat at Joe's!", 10
EatLen: equ $-EatMsg

SECTION .bss        ; section containing uninitialized data
SECTION .text       ; section containing code

_start:
    nop             ; this no-op keeps gdb happy
    mov eax, 4      ; specify sys_write syscall
    mov ebx, 1      ; specify file descriptor 1: standard output
    mov ecx, EatMsg ; pass offset of the message
     mov edx, EatLen ; pass the length of the message
    int 80H         ; make syscall to output the text to stdout

    mov eax, 1      ; specify exit syscall
    mov ebx, 0      ; return a code of zero
    int 80H         ; make syscall to terminate the program

Steps to reproduce:

1. Open an asm file (C-x C-f <filename>.asm)
2. Switch to gdb mode (M-x gdb)
3. Switch to gdb many windows mode (M-x gdb-many-windows)
4. Open gdb memory buffer anywhere (M-x gdb-display-memory-buffer)
 5. Set breakpoint to _start section (break _start)
6. Run program from _start section (run)
7. Step to the mov eax,4 instruction (type si several times)

Also I would like to know how can I set pointer to executed
instruction in the source window of assembly. In my case (look at the
screenshot) an arrow points to _start only.

--
Vadym



                 reply	other threads:[~2012-10-29 12: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='CABA4b_11zPD=nmLM6w8h3WX4BOya6835LZMOBc4rc-DYRB=FxQ@mail.gmail.com' \
    --to=thedieselspaceship@gmail.com \
    --cc=help-gnu-emacs@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.