Support added in commit
3417bfca676f for dwarf5 directory table 0
assumed that .file 0 was always the first debug .file directive.
That's not necessarily true.
* dwarf2dbg.c (get_directory_table_entry): Don't assume entry
1 is available after putting DW_AT_comp_dir in entry 0. Pass
pwd as file0_dirname to recursive call to avoid another
getpwd in the case file0_dirname is NULL.
is set to the current build directory). Since we are
about to create a directory entry that is not the
same, allocate the current directory first. */
- (void) get_directory_table_entry (pwd, file0_dirname,
- strlen (pwd), true);
- d = 1;
+ (void) get_directory_table_entry (pwd, pwd, strlen (pwd), true);
+ d = dirs_in_use;
}
else
d = 0;