https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498

--- Comment #11 from jonne <gcc at zutt dot org> ---
Doesn't seem to work, it cannot find the symbol.

(gdb) break __asan_init
Function "__asan_init" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

(I tried with three underscores too.)
Looks like it is there though:

$ otool -Iv ./a.out | egrep "___asan_(init|reg)"
0x0000000100049b80 10151 ___asan_init
0x0000000100049b86 10153 ___asan_register_globals
0x0000000100073ce0 10151 ___asan_init
0x0000000100073ce8 10153 ___asan_register_globals

Is this at all helpful?
(setting breakpoint to above two addresses for ___asan_init:

(gdb) break *0x0000000100049b80
Breakpoint 1 at 0x100049b80
(gdb) break *0x0000000100073ce0
Breakpoint 2 at 0x100073ce0
(gdb) run
Starting program: /private/tmp/a.out
[New Thread 0x1403 of process 49328]
warning: unhandled dyld version (15)

Thread 2 hit Breakpoint 1, 0x0000000100049b80 in ?? ()

Then 'layout asm' ... many jumps again ...

  
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
B+>│0x100049b80     jmpq   *0x2a15a(%rip)        # 0x100073ce0                 
                         │
   │0x100049b86     jmpq   *0x2a15c(%rip)        # 0x100073ce8                 
                         │
   │0x100049b8c     jmpq   *0x2a15e(%rip)        # 0x100073cf0                 
                         │
   │0x100049b92     jmpq   *0x2a160(%rip)        # 0x100073cf8                 
                         │
   │0x100049b98     jmpq   *0x2a162(%rip)        # 0x100073d00                 
                         │
   │0x100049b9e     jmpq   *0x2a164(%rip)        # 0x100073d08                 
                         │
   │0x100049ba4     jmpq   *0x2a166(%rip)        # 0x100073d10                 
                         │
   │0x100049baa     jmpq   *0x2a168(%rip)        # 0x100073d18                 
                         │
   │0x100049bb0     jmpq   *0x2a16a(%rip)        # 0x100073d20                 
                         │
   │0x100049bb6     jmpq   *0x2a16c(%rip)        # 0x100073d28                 
                         │
   │0x100049bbc     jmpq   *0x2a16e(%rip)        # 0x100073d30                 
                         │
   │0x100049bc2     jmpq   *0x2a170(%rip)        # 0x100073d38                 
                         │
   │0x100049bc8     jmpq   *0x2a172(%rip)        # 0x100073d40                 
                         │
   │0x100049bce     jmpq   *0x2a174(%rip)        # 0x100073d48                 
                         │
   │0x100049bd4     jmpq   *0x2a176(%rip)        # 0x100073d50                 
                         │
   │0x100049bda     jmpq   *0x2a178(%rip)        # 0x100073d58                 
                         │
   │0x100049be0     jmpq   *0x2a17a(%rip)        # 0x100073d60                 
                         │
   │0x100049be6     jmpq   *0x2a17c(%rip)        # 0x100073d68

Reply via email to