Bug 46689 - xscope fd_set debug output is undefined
Summary: xscope fd_set debug output is undefined
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/other (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) FreeBSD
: medium normal
Assignee: Alan Coopersmith
QA Contact: Xorg Project Team
URL:
Whiteboard: 2012BRB_Reviewed
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-02-27 12:58 UTC by Peter Jeremy
Modified: 2012-07-08 11:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Change fd_set debug output to display actual contents of first 32 or 64 bits. (1.06 KB, patch)
2012-02-27 12:58 UTC, Peter Jeremy
no flags Details | Splinter Review

Description Peter Jeremy 2012-02-27 12:58:00 UTC
Created attachment 57732 [details] [review]
Change fd_set debug output to display actual contents of first 32 or 64 bits.

In xscope-1.3.1, MainLoop() contains debug(128,...) code that appears intended to display the fd_set contents before and after the main select() call.  In most implementations, fd_set will be a struct though it is printed as an int, thus the actual debug output is unlikely to usefully reflect the actual fd_set contents.

I developed the attached patch whilst debugging a problem with the file descriptor sets.
Comment 1 Alan Coopersmith 2012-07-08 11:20:49 UTC
Thanks for the patch - pushed to git master for next release:
http://cgit.freedesktop.org/xorg/app/xscope/commit/?id=e63977f320b8678d66bb061b9502dc0764a5427f

Though in order to build on Solaris, I also had to push an additional fix to use
the Xpoll.h portability macros to deal with the different struct member names
used on different platforms:
http://cgit.freedesktop.org/xorg/app/xscope/commit/?id=b21c6c52bb8109329d7eb63072f8ebf41a42a7f9


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.