This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/17736] New: GDB only read 1 character from STDIN
- From: "mohd_shahril_96 at yahoo dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 21 Dec 2014 03:10:58 +0000
- Subject: [Bug c++/17736] New: GDB only read 1 character from STDIN
- Auto-submitted: auto-generated
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.