@@ -49,6 +49,7 @@ enum dwarf_tag {
49
49
DW_TAG_compile_unit = 0x11 ,
50
50
DW_TAG_inlined_subroutine = 0x1d ,
51
51
DW_TAG_subprogram = 0x2e ,
52
+ DW_TAG_skeleton_unit = 0x4a ,
52
53
};
53
54
54
55
enum dwarf_form {
@@ -2322,42 +2323,48 @@ find_address_ranges (struct backtrace_state *state, uintptr_t base_address,
2322
2323
break ;
2323
2324
2324
2325
case DW_AT_stmt_list :
2325
- if (abbrev -> tag == DW_TAG_compile_unit
2326
+ if ((abbrev -> tag == DW_TAG_compile_unit
2327
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2326
2328
&& (val .encoding == ATTR_VAL_UINT
2327
2329
|| val .encoding == ATTR_VAL_REF_SECTION ))
2328
2330
u -> lineoff = val .u .uint ;
2329
2331
break ;
2330
2332
2331
2333
case DW_AT_name :
2332
- if (abbrev -> tag == DW_TAG_compile_unit )
2334
+ if (abbrev -> tag == DW_TAG_compile_unit
2335
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2333
2336
{
2334
2337
name_val = val ;
2335
2338
have_name_val = 1 ;
2336
2339
}
2337
2340
break ;
2338
2341
2339
2342
case DW_AT_comp_dir :
2340
- if (abbrev -> tag == DW_TAG_compile_unit )
2343
+ if (abbrev -> tag == DW_TAG_compile_unit
2344
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2341
2345
{
2342
2346
comp_dir_val = val ;
2343
2347
have_comp_dir_val = 1 ;
2344
2348
}
2345
2349
break ;
2346
2350
2347
2351
case DW_AT_str_offsets_base :
2348
- if (abbrev -> tag == DW_TAG_compile_unit
2352
+ if ((abbrev -> tag == DW_TAG_compile_unit
2353
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2349
2354
&& val .encoding == ATTR_VAL_REF_SECTION )
2350
2355
u -> str_offsets_base = val .u .uint ;
2351
2356
break ;
2352
2357
2353
2358
case DW_AT_addr_base :
2354
- if (abbrev -> tag == DW_TAG_compile_unit
2359
+ if ((abbrev -> tag == DW_TAG_compile_unit
2360
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2355
2361
&& val .encoding == ATTR_VAL_REF_SECTION )
2356
2362
u -> addr_base = val .u .uint ;
2357
2363
break ;
2358
2364
2359
2365
case DW_AT_rnglists_base :
2360
- if (abbrev -> tag == DW_TAG_compile_unit
2366
+ if ((abbrev -> tag == DW_TAG_compile_unit
2367
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2361
2368
&& val .encoding == ATTR_VAL_REF_SECTION )
2362
2369
u -> rnglists_base = val .u .uint ;
2363
2370
break ;
@@ -2385,17 +2392,19 @@ find_address_ranges (struct backtrace_state *state, uintptr_t base_address,
2385
2392
}
2386
2393
2387
2394
if (abbrev -> tag == DW_TAG_compile_unit
2388
- || abbrev -> tag == DW_TAG_subprogram )
2395
+ || abbrev -> tag == DW_TAG_subprogram
2396
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2389
2397
{
2390
2398
if (!add_ranges (state , dwarf_sections , base_address ,
2391
2399
is_bigendian , u , pcrange .lowpc , & pcrange ,
2392
2400
add_unit_addr , (void * ) u , error_callback , data ,
2393
2401
(void * ) addrs ))
2394
2402
return 0 ;
2395
2403
2396
- /* If we found the PC range in the DW_TAG_compile_unit, we
2397
- can stop now. */
2398
- if (abbrev -> tag == DW_TAG_compile_unit
2404
+ /* If we found the PC range in the DW_TAG_compile_unit or
2405
+ DW_TAG_skeleton_unit, we can stop now. */
2406
+ if ((abbrev -> tag == DW_TAG_compile_unit
2407
+ || abbrev -> tag == DW_TAG_skeleton_unit )
2399
2408
&& (pcrange .have_ranges
2400
2409
|| (pcrange .have_lowpc && pcrange .have_highpc )))
2401
2410
return 1 ;
@@ -3607,7 +3616,8 @@ read_function_entry (struct backtrace_state *state, struct dwarf_data *ddata,
3607
3616
3608
3617
/* The compile unit sets the base address for any address
3609
3618
ranges in the function entries. */
3610
- if (abbrev -> tag == DW_TAG_compile_unit
3619
+ if ((abbrev -> tag == DW_TAG_compile_unit
3620
+ || abbrev -> tag == DW_TAG_skeleton_unit )
3611
3621
&& abbrev -> attrs [i ].name == DW_AT_low_pc )
3612
3622
{
3613
3623
if (val .encoding == ATTR_VAL_ADDRESS )
0 commit comments