public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17736] New: GDB only read 1 character from STDIN
@ 2014-12-21  3:11 mohd_shahril_96 at yahoo dot com
  0 siblings, 0 replies; only message in thread
From: mohd_shahril_96 at yahoo dot com @ 2014-12-21  3:11 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17736

            Bug ID: 17736
           Summary: GDB only read 1 character from STDIN
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: mohd_shahril_96 at yahoo dot com

Currently I'm now learning assembly language, out of curiosity, I want to see
how my program that was coded using assembly work under the hood, so I load up
GDB (with -tui and layout asm ) and start debugging.

It came at my surprise when GDB asking for STDIN input, it only take 1
character and then stop taking others even if I'm not pressing enter.

I tried again in terminal, it's working fine and my program can take multiple
STDIN input without any problem.

Here I provide partion from my testing assembly, this problem is reproducible
with following assembly :

global main

segment .bss                        ; hold uninitialize buffer

szinput     resb    10              ; declare 10 bytes uninitialize buffer
nszinput    equ     $ - szinput     ; equ is meaning constant

segment .text

main:

    pusha
    mov     eax, DWORD 3            ; read syscall
    mov     ebx, DWORD 0            ; 0 is stdin file descriptor
    mov     ecx, szinput            ; void *buf
    mov     edx, nszinput           ; size_t count
    int     80h                     ; invoke syscall
    popa
    ret

Note that this assembly is for NASM assembler.

Running gdb --version, and this is the result : GNU gdb (GDB)
7.8.50.20141221-cvs

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-21  3:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-21  3:11 [Bug c++/17736] New: GDB only read 1 character from STDIN mohd_shahril_96 at yahoo dot com

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).