This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch]change dwarf2_start_subfile() to adapt inappropriate dir name
>>>>> "Nathan" == Nathan Froyd <froydnj@codesourcery.com> writes:
Nathan> FWIW, we encountered this problem as well. This is the patch we used to
Nathan> fix it. It's very similar to the proposed patch, but slightly more
Nathan> complete.
Thanks.
Nathan> + if (dirname[dir_len-1] == SLASH_STRING[0])
Noting Eli's note...
Nathan> + memmove (concat_name+dir_len-1, concat_name+dir_len,
Spaces around the operators.
Nathan> + /* SLASH_STRING and trailing NULL */
Nathan> + strlen (filename) + 1 + 1);
I think it is mildly better to use strlen (SLASH_STRING) rather than 1.
Or just call concat two different ways instead of memmove.
This is ok with these nits fixed.
Tom