After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632168 - [gsttask] MSVC thread names for task debugging
[gsttask] MSVC thread names for task debugging
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal enhancement
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-14 19:14 UTC by David Hoyt
Modified: 2010-12-02 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sets task names as thread names for MSVC debugging (1.28 KB, patch)
2010-10-14 19:14 UTC, David Hoyt
committed Details | Review

Description David Hoyt 2010-10-14 19:14:17 UTC
Created attachment 172385 [details] [review]
Sets task names as thread names for MSVC debugging

The attached patch allows setting thread names for MSVC debugging in gst_task_configure_name().
Comment 1 Sebastian Dröge (slomo) 2010-10-19 14:04:27 UTC
Doesn't this require a C++ compiler to be used because of try-except? Also it would be good to print some kind of warning if the setting of the thread name failed, similar to the Linux code.
Comment 2 David Hoyt 2010-10-19 16:43:53 UTC
It's guarded by looking for the MSVC compiler which it works fine on and is intended only for use with the MSVC debugger and/or the SDK debugger. Any other debugger (e.g. GDB) would/should be incompatible. As such, since the compiler supports it, it's not a problem. It's also the only way to do it in native code w/ MSVC.

It's only for debug use and will only work for new threads that are started if the debugger is already attached. It's not a problem or an error if it didn't work. Besides, RaiseException() is void and I have no way of knowing if it succeeded or not.
Comment 3 Sebastian Dröge (slomo) 2010-10-20 08:16:59 UTC
So the MSVC C compiler understands some C++ constructs? That's great ;)

I guess the patch is fine then, I'll push it after the release :)
Comment 4 Sebastian Dröge (slomo) 2010-12-02 18:03:11 UTC
commit 7199a4f1ff71c422cb682fb5d78b6cc1a5f11e91
Author: David Hoyt <dhoyt@llnl.gov>
Date:   Wed Oct 20 10:18:18 2010 +0200

    gsttask: Set thread names on Windows with MSVC if a debugger is attached
    
    Fixes bug #632168.