invoke.texi (Debugging Options): Document change of debugging dump location.

2009-05-07  Mark Heffernan  <meheff@google.com>

	* doc/invoke.texi (Debugging Options): Document change of debugging
	dump location.
        * opts.c (decode_options): Make dump_base_name relative to
	aux_base_name directory.

From-SVN: r147249
This commit is contained in:
Mark Heffernan 2009-05-07 19:58:10 +00:00 committed by Mark Heffernan
parent fe4c7bc6ac
commit e71da632ea
3 changed files with 61 additions and 25 deletions

View File

@ -1,3 +1,10 @@
2009-05-07 Mark Heffernan <meheff@google.com>
* doc/invoke.texi (Debugging Options): Document change of debugging
dump location.
* opts.c (decode_options): Make dump_base_name relative to
aux_base_name directory.
2009-05-07 Hariharan Sandanagobalane <hariharan@picochip.com> 2009-05-07 Hariharan Sandanagobalane <hariharan@picochip.com>
* config/picochip/picochip.h (NO_DOLLAR_IN_LABEL): Added. * config/picochip/picochip.h (NO_DOLLAR_IN_LABEL): Added.

View File

@ -4585,13 +4585,14 @@ and dbg_cnt(tail_call) will return false always.
@itemx -fdump-rtl-@var{pass} @itemx -fdump-rtl-@var{pass}
@opindex d @opindex d
Says to make debugging dumps during compilation at times specified by Says to make debugging dumps during compilation at times specified by
@var{letters}. This is used for debugging the RTL-based passes of the @var{letters}. This is used for debugging the RTL-based passes of the
compiler. The file names for most of the dumps are made by appending a compiler. The file names for most of the dumps are made by appending
pass number and a word to the @var{dumpname}. @var{dumpname} is generated a pass number and a word to the @var{dumpname}, and the files are
from the name of the output file, if explicitly specified and it is not created in the directory of the output file. @var{dumpname} is
an executable, otherwise it is the basename of the source file. These generated from the name of the output file, if explicitly specified
switches may have different effects when @option{-E} is used for and it is not an executable, otherwise it is the basename of the
preprocessing. source file. These switches may have different effects when
@option{-E} is used for preprocessing.
Debug dumps can be enabled with a @option{-fdump-rtl} switch or some Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
@option{-d} option @var{letters}. Here are the possible @option{-d} option @var{letters}. Here are the possible
@ -4919,7 +4920,8 @@ invocations with different options, in particular with and without
@opindex fdump-translation-unit @opindex fdump-translation-unit
Dump a representation of the tree structure for the entire translation Dump a representation of the tree structure for the entire translation
unit to a file. The file name is made by appending @file{.tu} to the unit to a file. The file name is made by appending @file{.tu} to the
source file name. If the @samp{-@var{options}} form is used, @var{options} source file name, and the file is created in the same directory as the
output file. If the @samp{-@var{options}} form is used, @var{options}
controls the details of the dump as described for the controls the details of the dump as described for the
@option{-fdump-tree} options. @option{-fdump-tree} options.
@ -4927,16 +4929,19 @@ controls the details of the dump as described for the
@itemx -fdump-class-hierarchy-@var{options} @r{(C++ only)} @itemx -fdump-class-hierarchy-@var{options} @r{(C++ only)}
@opindex fdump-class-hierarchy @opindex fdump-class-hierarchy
Dump a representation of each class's hierarchy and virtual function Dump a representation of each class's hierarchy and virtual function
table layout to a file. The file name is made by appending @file{.class} table layout to a file. The file name is made by appending
to the source file name. If the @samp{-@var{options}} form is used, @file{.class} to the source file name, and the file is created in the
@var{options} controls the details of the dump as described for the same directory as the output file. If the @samp{-@var{options}} form
@option{-fdump-tree} options. is used, @var{options} controls the details of the dump as described
for the @option{-fdump-tree} options.
@item -fdump-ipa-@var{switch} @item -fdump-ipa-@var{switch}
@opindex fdump-ipa @opindex fdump-ipa
Control the dumping at various stages of inter-procedural analysis Control the dumping at various stages of inter-procedural analysis
language tree to a file. The file name is generated by appending a switch language tree to a file. The file name is generated by appending a
specific suffix to the source file name. The following dumps are possible: switch specific suffix to the source file name, and the file is created
in the same directory as the output file. The following dumps are
possible:
@table @samp @table @samp
@item all @item all
@ -4954,22 +4959,25 @@ Dump after function inlining.
@item -fdump-statistics-@var{option} @item -fdump-statistics-@var{option}
@opindex -fdump-statistics @opindex -fdump-statistics
Enable and control dumping of pass statistics in a separate file. The Enable and control dumping of pass statistics in a separate file. The
file name is generated by appending a suffix ending in @samp{.statistics} file name is generated by appending a suffix ending in
to the source file name. If the @samp{-@var{option}} form is used, @samp{.statistics} to the source file name, and the file is created in
@samp{-stats} will cause counters to be summed over the whole compilation unit the same directory as the output file. If the @samp{-@var{option}}
while @samp{-details} will dump every event as the passes generate them. form is used, @samp{-stats} will cause counters to be summed over the
The default with no option is to sum counters for each function compiled. whole compilation unit while @samp{-details} will dump every event as
the passes generate them. The default with no option is to sum
counters for each function compiled.
@item -fdump-tree-@var{switch} @item -fdump-tree-@var{switch}
@itemx -fdump-tree-@var{switch}-@var{options} @itemx -fdump-tree-@var{switch}-@var{options}
@opindex fdump-tree @opindex fdump-tree
Control the dumping at various stages of processing the intermediate Control the dumping at various stages of processing the intermediate
language tree to a file. The file name is generated by appending a switch language tree to a file. The file name is generated by appending a
specific suffix to the source file name. If the @samp{-@var{options}} switch specific suffix to the source file name, and the file is
form is used, @var{options} is a list of @samp{-} separated options that created in the same directory as the output file. If the
control the details of the dump. Not all options are applicable to all @samp{-@var{options}} form is used, @var{options} is a list of
dumps, those which are not meaningful will be ignored. The following @samp{-} separated options that control the details of the dump. Not
options are available all options are applicable to all dumps, those which are not
meaningful will be ignored. The following options are available
@table @samp @table @samp
@item address @item address

View File

@ -961,6 +961,27 @@ decode_options (unsigned int argc, const char **argv)
handle_options (argc, argv, lang_mask); handle_options (argc, argv, lang_mask);
/* Make DUMP_BASE_NAME relative to the AUX_BASE_NAME directory,
typically the directory to contain the object file. */
if (aux_base_name && ! IS_ABSOLUTE_PATH (dump_base_name))
{
const char *aux_base;
base_of_path (aux_base_name, &aux_base);
if (aux_base_name != aux_base)
{
int dir_len = aux_base - aux_base_name;
char *new_dump_base_name =
XNEWVEC (char, strlen(dump_base_name) + dir_len + 1);
/* Copy directory component from AUX_BASE_NAME. */
memcpy (new_dump_base_name, aux_base_name, dir_len);
/* Append existing DUMP_BASE_NAME. */
strcpy (new_dump_base_name + dir_len, dump_base_name);
dump_base_name = new_dump_base_name;
}
}
/* Handle related options for unit-at-a-time, toplevel-reorder, and /* Handle related options for unit-at-a-time, toplevel-reorder, and
section-anchors. */ section-anchors. */
if (!flag_unit_at_a_time) if (!flag_unit_at_a_time)