gdb/dwarf: pass compilation directory to line header
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 27 Apr 2022 01:40:51 +0000 (21:40 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 30 Jul 2022 00:54:49 +0000 (20:54 -0400)
commitddc01737d34f16074b2c9a92c5a808be5c91340f
tree8acce31c8736d1749f358e57d2f4761a58b4c89d
parent80affb9f80d22ee4b1463f23a36b083e05b6d2c3
gdb/dwarf: pass compilation directory to line header

The following patch changes line_header::file_file_name to prepend the
compilation directory to the file name, if needed.  For that, the line
header needs to know about the compilation directory.  Prepare for that
by adding a constructor that takes it as a parameter, and passing the
value down everywhere needed.  Add a second constructor for the special
case of building a line_header for doing a hash table lookup, since that
case doesn't require a compilation directory value.

Change-Id: Iba3ba0293e4e2d13a64b257cf9a3094684d54330
gdb/dwarf2/line-header.c
gdb/dwarf2/line-header.h
gdb/dwarf2/read.c