Closed
Bug 571425
Opened 16 years ago
Closed 16 years ago
Enable NSLinkEditError logging for pr_LoadMachDyldModule in prlink.c
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
4.8.7
People
(Reporter: alqahira, Assigned: alqahira)
Details
Attachments
(1 file, 1 obsolete file)
This is similar to bug 354248, which implemented NSLinkEditError logging in pr_LoadViaDyld.
As reported in bug 354248 comment 17, we had a module loading error in Camino recently when working on getting it to build against mozilla-central, and the error message we got was rather useless. Stuart did some searching and he thought the error came through the unpatched codepath.
I've ported Nick's fix for pr_LoadViaDyld to pr_LoadMachDyldModule and verified (via an additional fprintf to stderr, not included in this patch) that, when I duplicated the module failure we hit originally, 1) I'm hitting the pr_LoadMachDyldModule codepath and 2) I'm retrieving error messages from NSLinkEditError, specifically the expected error based on the problem we had.
However, to actually get a useful error message into the XPCOM component loader where Stuart and I would have seen it in our Console when we hit this error, the follow-up work Wan-Teh suggested in bug 354248 comment 16 (or something similar, for the return values for pr_LoadMachDyldModule) is still required.
This is because we were hitting http://mxr.mozilla.org/mozilla-central/source/xpcom/components/nsNativeComponentLoader.cpp#161 and that function's error logging wants to use PR_GetErrorText to retrieve the error; otherwise the error is just the generic unknown error we saw.
I'm afraid that hooking up these error messages to PR_SetErrorText is going to be beyond my abilities, though :(
The attached patch is essentially a straight copy-paste of Nick's patch, with a change to use the right variable name for this method. It's against whatever NSPR version is on mozilla-central right now.
Attachment #450553 -
Flags: review?(wtc)
| Assignee | ||
Updated•16 years ago
|
Attachment #450553 -
Attachment is patch: true
Attachment #450553 -
Attachment mime type: application/octet-stream → text/plain
Comment 1•16 years ago
|
||
I made a minor edit (reordered variable declarations to
match the order in which they're used) and checked this
in on the NSPR trunk (NSPR 4.8.7).
Checking in prlink.c;
/cvsroot/mozilla/nsprpub/pr/src/linking/prlink.c,v <-- prlink.c
new revision: 3.109; previous revision: 3.108
done
Attachment #450553 -
Attachment is obsolete: true
Attachment #450553 -
Flags: review?(wtc)
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.8.7
| Assignee | ||
Comment 2•16 years ago
|
||
Thanks!
I opened Bug 587535 for the "follow-up work" of getting the messages into PR_SetErrorText (i.e., bug 354248 comment 16 and the second half of comment 0 above), since I didn't see any other bug about those, in case someone else discovers they need those errors.
You need to log in
before you can comment on or make changes to this bug.
Description
•