[Nasm-bugs] [Bug 3392641] New: Used apt-get in Ubuntu
noreply-nasm at dev.nasm.us
noreply-nasm at dev.nasm.us
Sat Dec 28 20:17:25 PST 2019
https://bugzilla.nasm.us/show_bug.cgi?id=3392641
Bug ID: 3392641
Summary: Used apt-get in Ubuntu
Product: NASM
Version: 2.14.xx
Hardware: Other x86
OS: Linux
Status: OPEN
Severity: normal
Priority: Medium
Component: Assembler
Assignee: nobody at nasm.us
Reporter: ray.seyfarth at gmail.com
CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
hpa at zytor.com, nasm-bugs at nasm.us
Obtained from: Other (please explain)
Created attachment 411753
--> https://bugzilla.nasm.us/attachment.cgi?id=411753&action=edit
A very short assembly file exhibiting problems debugging.
The attached program defines a very short main program which calls srand and
then calls rand in a loop. The loop is labelled with top as the place to jump
back to. The first problem is that using gdb the "ni" command never returns
from the call to srand and later rand. If I place a temporary breakpoint on
the instruction after the call and do "continue" it will execute srand and
return. Then I hit to call instruction with the label "top". Again I set a
temporary breakpoint and do "continue". It does break on the proper
instruction. However at this point gdb thinks I am in the "top" function based
on using "backtrace". Indeed "top" appears twice and main is skipped.
I think the basic error is that the non-global label "top" is being defined in
the executable as a global symbol which is essentially like a function.
However I don't have an ideas about why the "ni" command goes crazy unless I
have forgotten and it only occurs at or after the "top" label. It may be
because the next instruction after the first call is labelled "top".
I see no reason why one would want to confuse the debugger. I get the same
issues with lldb. However if I assemble with yasm the existence of top is
unknown to gdb and the "ni" instruction executes the calls as it should.
Please note that to keep this short the loop is an infinite loop. I'm sorry if
that looks stupid. It is a very simple program illustrating my concerns.
Hopefully the inclusion of top in the global symbols list is the only problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
More information about the Nasm-bugs
mailing list