Debugging IPC With All Those Macros

145 views
Skip to first unread message

Clayton Carney

unread,
Jul 18, 2013, 7:18:34 PM7/18/13
to chromi...@chromium.org
I admit that I'm a novice with C++ and Windbg. Nevertheless, I am attempting to debug what appears to be a cross-process race condition. The tracing done so far suggests that the problem is occurring in Chrome's IPC. However, the IPC is littered with macros, which seemingly makes it impossible to debug. Can any experienced debuggers provide suggestions or point me to some references which would help me figure out how to proceed?

Jonathan Dixon

unread,
Jul 18, 2013, 7:30:26 PM7/18/13
to clayton...@gmail.com, chromium-dev
I'm not familiar with it myself, but http://src.chromium.org/viewvc/chrome/trunk/src/ipc/ipc_logging.h?revision=212157 may be your friend. Especially..

52 // Enable and Disable are NOT cross-process; they only affect the
53 // current thread/process. If you want to modify the value for all
54 // processes, perhaps your intent is to call
55 // g_browser_process->SetIPCLoggingEnabled().


(I think that comment maybe a bit stale actually. I don't see any BrowserProcess::SetIPCLoggingEnabled() method. But hopefully it's a clue where to start)



On 18 July 2013 16:18, Clayton Carney <clayton...@gmail.com> wrote:
I admit that I'm a novice with C++ and Windbg. Nevertheless, I am attempting to debug what appears to be a cross-process race condition. The tracing done so far suggests that the problem is occurring in Chrome's IPC. However, the IPC is littered with macros, which seemingly makes it impossible to debug. Can any experienced debuggers provide suggestions or point me to some references which would help me figure out how to proceed?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/e3f76274-2475-4075-958c-74d377df1cb3%40chromium.org.
 
 

Zachary Turner

unread,
Jul 18, 2013, 7:44:29 PM7/18/13
to clayton...@gmail.com, Chromium-dev
There's lots of macros and some of them are fairly simple, such as message maps which simply call a pre-defined function based on a message code.  So without more specifics there's only so much I can say.

However, if you want the swiss army knife, then just attach WinDbg (or even Visual Studio for that matter) to all of the chrome processes, and then start setting tracepoints all over the place.  This is akin to adding arbitrary logging wherever you want, at runtime, without recompiling anything.


On Thu, Jul 18, 2013 at 4:18 PM, Clayton Carney <clayton...@gmail.com> wrote:
I admit that I'm a novice with C++ and Windbg. Nevertheless, I am attempting to debug what appears to be a cross-process race condition. The tracing done so far suggests that the problem is occurring in Chrome's IPC. However, the IPC is littered with macros, which seemingly makes it impossible to debug. Can any experienced debuggers provide suggestions or point me to some references which would help me figure out how to proceed?

--

Nico Weber

unread,
Jul 18, 2013, 8:02:24 PM7/18/13
to Zachary Turner, Chromium-dev, clayton...@gmail.com

Look at about:IPC (win/Mac only, Dev build only).

Tom Hudson

unread,
Jul 19, 2013, 3:58:47 AM7/19/13
to clayton...@gmail.com, Chromium-dev
If you can use chrome://tracing to capture the activities you're interested in, IPCs are identified there, and you'll at least be able to analyze the various IPC orders you're seeing and how they play out.


On Fri, Jul 19, 2013 at 12:18 AM, Clayton Carney <clayton...@gmail.com> wrote:
I admit that I'm a novice with C++ and Windbg. Nevertheless, I am attempting to debug what appears to be a cross-process race condition. The tracing done so far suggests that the problem is occurring in Chrome's IPC. However, the IPC is littered with macros, which seemingly makes it impossible to debug. Can any experienced debuggers provide suggestions or point me to some references which would help me figure out how to proceed?

--
Reply all
Reply to author
Forward
0 new messages