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: one week to gdb-7.6 release?


> But then why do we need an implementation in posix-hdep.c at all?

I did not mean to say that we do need an implementation in posix-hdep,
just saying that we might someday in the future - and if we do, a
comment explaining the currrent implemention would help the next person
looking at it.

> The
> code in main.c already does
> 
>   #ifdef __MINGW32__
>     /* On Windows, argv[0] is not necessarily set to absolute form when
>        GDB is found along PATH, without which relocation doesn't work.  */
>     gdb_program_name = windows_get_absolute_argv0 (argv[0]);
>   #else
>     gdb_program_name = xstrdup (argv[0]);
>   #endif
> 
> Is moving that to posix-hdep.c just to avoid an ifdef?

The main purpose is to move the code away out of windows-nat, which
is only linked in native debuggers, not cross ones - so that building
a cross debugger hosted on Windows will work again. Basically, your
new function is really only dependent on the host, whereas the -nat
file makes the assumption that host & target are Windows.

-- 
Joel


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