This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Option to set the debug map (DW_AT_comp_dir) value "from scratch"
- From: Luca Palano <contact at lpzone dot it>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 25 Jun 2019 18:22:32 +0200
- Subject: Option to set the debug map (DW_AT_comp_dir) value "from scratch"
Hi everyone,
Recently I used the following debugger option: -fdebug-prefix-map=old=new
in order to set the DW_AT_comp_dir, in the target executable, according to
my needs.
In order to do this, first of all, I needed to know the DW_AT_comp_dir
value set in the executable after an initial build. So, I was forced to use
the "objdump" command in order to fetch it (e.g.: /path/to/replace). With
this value I was able to populate the option values accordingly:
-fdebug-prefix-map=/path/to/replace=/new/path/to/set
I'm curious if there is a property like the following e.g.:
-fdebug-map=/new/path/to/set to set the DW_AT_comp_dir path, directly, from
scratch, without the need to look for the value to replace before.
Thanks,
Luca