bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/30206] Missing line numbers for instructions coded with .byte,


From: iii at linux dot ibm.com
Subject: [Bug gas/30206] Missing line numbers for instructions coded with .byte, .short, .long and .quad
Date: Mon, 13 Mar 2023 20:02:00 +0000

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

Ilya Leoshkevich <iii at linux dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arnez at linux dot ibm.com

--- Comment #2 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
Hi Nick!

Thanks for having a look. I don't think this is important enough to
warrant a new option. The problem is that the default behavior is quite
confusing, and it took us some time to realize that, if we do

    int main(void) {
        asm(".byte 0x0f,0x0b"); /* ud2 */
    }

and get

    Program received signal SIGILL, Illegal instruction.
    0x000000000040110a in main () at 1.c:1
    1   int main(void) {

instead of the asm statement, it's not gdb's, gcc's or ld's bug, but
rather as's intended behavior. After we found that out, switching to
using .insn was quick and painless.

What do you think about adding something like the following to
documentation of all data directives?

    Note that the preferred way for encoding instructions is using
    .insn directive. as does not generate line number information for
    data directives.

One problem is that .insn is not documented in
https://sourceware.org/binutils/docs/as/. I guess this is because .insn
is target-dependent. The statement could probably be expanded to cover
that.

Best regards,
Ilya

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]