Changeset 3e06da2 for doc/working


Ignore:
Timestamp:
Jan 15, 2019, 10:57:49 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
42506e1, c9aba81
Parents:
fd73248
Message:

Apparent fix for debug resolution problem with exceptions

Location:
doc/working/exception/impl
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • doc/working/exception/impl/Makefile

    rfd73248 r3e06da2  
    1 CFLAGS = -fexceptions -Wall -Werror
     1CFLAGS = -fexceptions -Wall -Werror -g
    22CC = gcc
    33
     
    1616        $(CC) $(CFLAGS) -o $@ $^
    1717
     18exception.s: exception.c
     19        $(CC) $(CFLAGS) -S -o $@ -fPIC $^
     20
    1821libexcept.so: exception.c
    1922        $(CC) $(CFLAGS) -shared -o $@ -fPIC $^
  • doc/working/exception/impl/exception.c

    rfd73248 r3e06da2  
    382382        "       .text\n"                                                        // TABLE footer
    383383        "       .size   __try_terminate, .-__try_terminate\n"
     384);
     385
     386// Somehow this piece of helps with the resolution of debug symbols.
     387__attribute__((unused)) static const int dummy = 0;
     388asm (
    384389        "       .hidden CFA.ref.__gcfa_personality_v0\n"        // Declare an new hidden symbol
    385390        "       .weak   CFA.ref.__gcfa_personality_v0\n"
  • doc/working/exception/impl/pic.s

    rfd73248 r3e06da2  
    11        .file   "test.c"
    22        .text
     3.Ltext0:
    34        .globl  clean
    45        .type   clean, @function
    56clean:
    67.LFB0:
     8        .file 1 "test.c"
     9        .loc 1 1 0
    710        .cfi_startproc
    811        pushq   %rbp
     
    1215        .cfi_def_cfa_register 6
    1316        movq    %rdi, -8(%rbp)
     17        .loc 1 1 0
    1418        nop
    1519        popq    %rbp
     
    2327foo:
    2428.LFB1:
     29        .loc 1 4 0
    2530        .cfi_startproc
    2631        .cfi_personality 0x9b,DW.ref.__gcc_personality_v0
     
    3944        .cfi_offset 3, -40
    4045        movl    %edi, -52(%rbp)
     46        .loc 1 4 0
    4147        movq    %fs:40, %rax
    4248        movq    %rax, -40(%rbp)
    4349        xorl    %eax, %eax
     50        .loc 1 6 0
    4451        movl    -52(%rbp), %eax
    4552        movl    %eax, %edi
     
    5057        movl    $0, %r12d
    5158.L7:
     59        .loc 1 5 0
    5260        leaq    -44(%rbp), %rax
    5361        movq    %rax, %rdi
     
    5664        cmpl    $1, %r12d
    5765        je      .L4
     66        .loc 1 6 0
    5867        movl    %r13d, %eax
     68        .loc 1 7 0
    5969        movq    -40(%rbp), %rdx
    6070        xorq    %fs:40, %rdx
     
    6474        movq    %rax, %rbx
    6575        movl    $1, %r12d
     76        .loc 1 5 0
    6677        jmp     .L7
    6778.L4:
     
    7182.LEHE1:
    7283.L10:
     84        .loc 1 7 0
    7385        call    __stack_chk_fail@PLT
    7486.L8:
     
    101113        .text
    102114        .size   foo, .-foo
     115.Letext0:
     116        .section        .debug_info,"",@progbits
     117.Ldebug_info0:
     118        .long   0x9c
     119        .value  0x4
     120        .long   .Ldebug_abbrev0
     121        .byte   0x8
     122        .uleb128 0x1
     123        .long   .LASF0
     124        .byte   0xc
     125        .long   .LASF1
     126        .long   .LASF2
     127        .quad   .Ltext0
     128        .quad   .Letext0-.Ltext0
     129        .long   .Ldebug_line0
     130        .uleb128 0x2
     131        .string "foo"
     132        .byte   0x1
     133        .byte   0x4
     134        .long   0x68
     135        .quad   .LFB1
     136        .quad   .LFE1-.LFB1
     137        .uleb128 0x1
     138        .byte   0x9c
     139        .long   0x68
     140        .uleb128 0x3
     141        .string "x"
     142        .byte   0x1
     143        .byte   0x4
     144        .long   0x68
     145        .uleb128 0x3
     146        .byte   0x91
     147        .sleb128 -68
     148        .uleb128 0x4
     149        .string "i"
     150        .byte   0x1
     151        .byte   0x5
     152        .long   0x68
     153        .uleb128 0x2
     154        .byte   0x91
     155        .sleb128 -60
     156        .byte   0
     157        .uleb128 0x5
     158        .byte   0x4
     159        .byte   0x5
     160        .string "int"
     161        .uleb128 0x6
     162        .long   .LASF3
     163        .byte   0x1
     164        .byte   0x1
     165        .quad   .LFB0
     166        .quad   .LFE0-.LFB0
     167        .uleb128 0x1
     168        .byte   0x9c
     169        .long   0x99
     170        .uleb128 0x3
     171        .string "p"
     172        .byte   0x1
     173        .byte   0x1
     174        .long   0x99
     175        .uleb128 0x2
     176        .byte   0x91
     177        .sleb128 -24
     178        .byte   0
     179        .uleb128 0x7
     180        .byte   0x8
     181        .long   0x68
     182        .byte   0
     183        .section        .debug_abbrev,"",@progbits
     184.Ldebug_abbrev0:
     185        .uleb128 0x1
     186        .uleb128 0x11
     187        .byte   0x1
     188        .uleb128 0x25
     189        .uleb128 0xe
     190        .uleb128 0x13
     191        .uleb128 0xb
     192        .uleb128 0x3
     193        .uleb128 0xe
     194        .uleb128 0x1b
     195        .uleb128 0xe
     196        .uleb128 0x11
     197        .uleb128 0x1
     198        .uleb128 0x12
     199        .uleb128 0x7
     200        .uleb128 0x10
     201        .uleb128 0x17
     202        .byte   0
     203        .byte   0
     204        .uleb128 0x2
     205        .uleb128 0x2e
     206        .byte   0x1
     207        .uleb128 0x3f
     208        .uleb128 0x19
     209        .uleb128 0x3
     210        .uleb128 0x8
     211        .uleb128 0x3a
     212        .uleb128 0xb
     213        .uleb128 0x3b
     214        .uleb128 0xb
     215        .uleb128 0x27
     216        .uleb128 0x19
     217        .uleb128 0x49
     218        .uleb128 0x13
     219        .uleb128 0x11
     220        .uleb128 0x1
     221        .uleb128 0x12
     222        .uleb128 0x7
     223        .uleb128 0x40
     224        .uleb128 0x18
     225        .uleb128 0x2116
     226        .uleb128 0x19
     227        .uleb128 0x1
     228        .uleb128 0x13
     229        .byte   0
     230        .byte   0
     231        .uleb128 0x3
     232        .uleb128 0x5
     233        .byte   0
     234        .uleb128 0x3
     235        .uleb128 0x8
     236        .uleb128 0x3a
     237        .uleb128 0xb
     238        .uleb128 0x3b
     239        .uleb128 0xb
     240        .uleb128 0x49
     241        .uleb128 0x13
     242        .uleb128 0x2
     243        .uleb128 0x18
     244        .byte   0
     245        .byte   0
     246        .uleb128 0x4
     247        .uleb128 0x34
     248        .byte   0
     249        .uleb128 0x3
     250        .uleb128 0x8
     251        .uleb128 0x3a
     252        .uleb128 0xb
     253        .uleb128 0x3b
     254        .uleb128 0xb
     255        .uleb128 0x49
     256        .uleb128 0x13
     257        .uleb128 0x2
     258        .uleb128 0x18
     259        .byte   0
     260        .byte   0
     261        .uleb128 0x5
     262        .uleb128 0x24
     263        .byte   0
     264        .uleb128 0xb
     265        .uleb128 0xb
     266        .uleb128 0x3e
     267        .uleb128 0xb
     268        .uleb128 0x3
     269        .uleb128 0x8
     270        .byte   0
     271        .byte   0
     272        .uleb128 0x6
     273        .uleb128 0x2e
     274        .byte   0x1
     275        .uleb128 0x3f
     276        .uleb128 0x19
     277        .uleb128 0x3
     278        .uleb128 0xe
     279        .uleb128 0x3a
     280        .uleb128 0xb
     281        .uleb128 0x3b
     282        .uleb128 0xb
     283        .uleb128 0x27
     284        .uleb128 0x19
     285        .uleb128 0x11
     286        .uleb128 0x1
     287        .uleb128 0x12
     288        .uleb128 0x7
     289        .uleb128 0x40
     290        .uleb128 0x18
     291        .uleb128 0x2117
     292        .uleb128 0x19
     293        .uleb128 0x1
     294        .uleb128 0x13
     295        .byte   0
     296        .byte   0
     297        .uleb128 0x7
     298        .uleb128 0xf
     299        .byte   0
     300        .uleb128 0xb
     301        .uleb128 0xb
     302        .uleb128 0x49
     303        .uleb128 0x13
     304        .byte   0
     305        .byte   0
     306        .byte   0
     307        .section        .debug_aranges,"",@progbits
     308        .long   0x2c
     309        .value  0x2
     310        .long   .Ldebug_info0
     311        .byte   0x8
     312        .byte   0
     313        .value  0
     314        .value  0
     315        .quad   .Ltext0
     316        .quad   .Letext0-.Ltext0
     317        .quad   0
     318        .quad   0
     319        .section        .debug_line,"",@progbits
     320.Ldebug_line0:
     321        .section        .debug_str,"MS",@progbits,1
     322.LASF0:
     323        .string "GNU C11 7.4.0 -mtune=generic -march=x86-64 -g -fexceptions -fPIC -fstack-protector-strong"
     324.LASF2:
     325        .string "/home/tdelisle/workspace/cforall/main/doc/working/exception/impl"
     326.LASF1:
     327        .string "test.c"
     328.LASF3:
     329        .string "clean"
    103330        .hidden DW.ref.__gcc_personality_v0
    104331        .weak   DW.ref.__gcc_personality_v0
Note: See TracChangeset for help on using the changeset viewer.