This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Don't loose compilation directory in Dwarf2 line-tables


Frederic,

For what it's worth, I fixed the same bug yesterday.  Our changes
are similar - in dwarf2_start_subfile I used this code at the end
of the function:

  /* APPLE LOCAL: If FILENAME isn't an absolute path and DIRNAME is either
     NULL or a relative path, prepend COMP_DIR on there to get an absolute
     path.  */

  if (!IS_ABSOLUTE_PATH (filename) && dirname == NULL)
    dirname = comp_dir;
  else 
    if (!IS_ABSOLUTE_PATH (filename) && !IS_ABSOLUTE_PATH (dirname))
      {
        dirname = concat (comp_dir, SLASH_STRING, dirname, (char *) NULL);
        make_cleanup (xfree, dirname);
      }
  start_subfile (filename, dirname);
  do_cleanups (clean);


(with 'cleanup' initialized to a null_cleanup at the top of the file,
naturally.)

J


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]