From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <pedro_alves@portugalmail.pt>
Cc: gdb-patches@sourceware.org
Subject: Re: PR/2386 [2/2]: MinGW attach to process without an exec file
Date: Sat, 29 Dec 2007 05:42:00 -0000 [thread overview]
Message-ID: <20071229035030.GC30002@adacore.com> (raw)
In-Reply-To: <477579E0.5010809@portugalmail.pt>
I have a couple of questions, out of curiosity...
> Can we reach a compromise here ? I've removed the 9x support from this
> patch. With the changes inplace, win32_pid_to_exec_file
>
> - looks in the Cygwin processes using cygwin_internal (CW_GETPINFO, ...).
> This is what's done currently, so Cygwin processes will be detected
> like before.
If we are going to have some code that does this natively as suggested
below, why have some code that would work on cygwin only? Is the above
going to cover more cases (windows versions?) than the approach below?
> - If that fails, tries to get at the filename associated with the file
> handle that the debug api gives us in the CREATE_PROCESS_DEBUG_EVENT.
> Previously, it was just closed; we now store it in a global variable.
> This relies on the internal NT name of the HANDLE, and it may change
> in future releases, hence,
If you propose another fallback approach, it means that this would
not necessarily work all the time. Do you know when it wouldn't work?
If you do, then perhaps we could document this in the code.
> - If that fails, GetModuleFileNameEx from psapi.dll is used.
Same here, if we know the conditions when this would or woudln't work,
a comment would be very helpful for future contributors.
--
Joel
next prev parent reply other threads:[~2007-12-29 3:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-28 1:35 Pedro Alves
2007-12-28 4:33 ` Christopher Faylor
2007-12-29 3:37 ` Pedro Alves
2007-12-29 3:50 ` Joel Brobecker
2007-12-29 11:47 ` Eli Zaretskii
2007-12-29 14:02 ` Lerele
2007-12-29 5:42 ` Joel Brobecker [this message]
2007-12-29 12:59 ` Pedro Alves
2007-12-29 14:35 ` Pedro Alves
2007-12-29 18:48 ` Christopher Faylor
2007-12-29 20:15 ` Eli Zaretskii
2007-12-29 22:46 ` Pedro Alves
2007-12-30 3:07 ` Christopher Faylor
2007-12-30 4:32 ` Eli Zaretskii
2007-12-30 20:37 ` Christopher Faylor
2007-12-31 6:35 ` Eli Zaretskii
2007-12-31 8:12 ` Christopher Faylor
2007-12-31 21:38 ` Eli Zaretskii
2007-12-30 20:41 ` Pedro Alves
2007-12-30 4:20 ` Eli Zaretskii
2007-12-31 4:13 ` Pedro Alves
2007-12-29 11:41 ` Eli Zaretskii
2007-12-29 11:33 ` Eli Zaretskii
2007-12-29 14:33 ` Pedro Alves
2007-12-29 16:08 ` Eli Zaretskii
2007-12-30 0:30 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071229035030.GC30002@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro_alves@portugalmail.pt \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox