This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: crossgcc debug with HP emulator


Thanks, 

Looks like this may work for me.  I will give it a try and let you know.

Which leads me to the next question - how does one install a patch (ok, yes
I am a newbie....)?

Thanks,

- Steve


--
Steve deRosier
Embedded Software Engineer
Vari-Lite International, Inc.


----------
>From: Jepsen Hans Peter <hans_peter_jepsen@Danfoss.com>
>To: "'Steve deRosier'" <sderosier@vari-lite.com>, crossgcc
<crossgcc@sources.redhat.com>
>Subject: RE: crossgcc debug with HP emulator
>Date: Tue, Jan 9, 2001, 7:53 AM
>

> Hi
>
> Steve deRosier wrote:
>
>> I am having problems creating code with my crossgcc that
>> works properly with the HP emulator that we are using.
> ...
>
>> Is there a flag that I am missing or another
>> permutation of the -g flag that will allow me to display the
>> C/C++ source in my debugger?
>
> We had the same problem. I ended up in modifying gcc as shown in the
> attached small patch.
>
> The effect is to add an option: -fkeep-file-path
> that, when applied, does not strip the path from the supplied filename.
>
> For us it works with HP emulator and Lauterbach hostdriver.
>
> Kind regards
>
> Hans Peter
>
>    --
> Hans Peter Jepsen          Phone: +45 74 88 50 11
> Danfoss Drives A/S,        Fax:   +45 74 65 28 38
> DG-133, Ulsnaes 1,         Email: Hans_Peter_Jepsen@danfoss.com
> DK-6300 Graasten, Denmark  or:    hpj@computer.org
>
>
>
> *** egcs-1.1b/gcc/toplev.c.orig Sun May  2 20:47:14 1999
> --- egcs-1.1b/gcc/toplev.c Mon Jun 21 09:06:40 1999
> ***************
> *** 721,726 ****
> --- 721,731 ----
>      if alias analysis (in general) is enabled.  */
>   int flag_strict_aliasing = 0;
>
> + /* -fkeep-file-path causes the file directive in the outputfile to be the
> name
> +    given on the commandline, ie a possible directory path is not removed.
> +    Normal/default behavior is to strip the path */
> + int keep_file_path = 0;
> +
>   extern int flag_dump_unnumbered;
>
>
> ***************
> *** 908,913 ****
> --- 913,920 ----
>      "Generate code to check every memory access" },
>     {"prefix-function-name", &flag_prefix_function_name, 1,
>      "Add a prefix to all function names" },
> +   {"keep-file-path", &keep_file_path,1,
> +    "Do not strip path in .file directive"},
>     {"dump-unnumbered", &flag_dump_unnumbered, 1}
>   };
>
> ***************
> *** 2371,2386 ****
>        FILE *asm_file;
>        char *input_name;
>   {
> !   int len = strlen (input_name);
> !   char *na = input_name + len;
>
> !   /* NA gets INPUT_NAME sans directory names.  */
> !   while (na > input_name)
> !     {
> !       if (na[-1] == '/')
> !  break;
> !       na--;
> !     }
>
>   #ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
>     ASM_OUTPUT_MAIN_SOURCE_FILENAME (asm_file, na);
> --- 2378,2400 ----
>        FILE *asm_file;
>        char *input_name;
>   {
> !    char *na;
> !
> !    if ( keep_file_path) /* leave the input_name unchanged */
> !       na = input_name;
> !    else /* strip leadin path from input_name - default behaviour */
> !    {
> !       int len = strlen (input_name);
> !       na = input_name + len;
>
> !       /* NA gets INPUT_NAME sans directory names.  */
> !       while (na > input_name)
> !       {
> !   if (na[-1] == '/')
> !      break;
> !   na--;
> !       }
> !    }
>
>   #ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
>     ASM_OUTPUT_MAIN_SOURCE_FILENAME (asm_file, na);
>
>
> 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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