Closed Bug 46543 Opened 26 years ago Closed 17 years ago

Support XPCOM_BREAK_ON_LOAD for Sun Solaris

Categories

(Core :: XPCOM, defect, P3)

Sun
Solaris
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: axel, Unassigned)

Details

Attachments

(1 file)

In http://lxr.mozilla.org/seamonkey/source/xpcom/components/xcDll.cpp#483 there is only support for intel linux and VMS. Find the debugger trap on Solaris and add the appropriate call there. For those, that have not completely abandoned the Workshop Compilers, is there a difference between dbx and gdb? Axel
I've just had a quick look at the gdb source code. For SPARC there is the following in .../gdb-5.0/gdb/sparc-stub.c /* This function will generate a breakpoint exception. It is used at the beginning of a program to sync up with a debugger and can be used otherwise as a quick means to stop program execution and "break" into the debugger. */ void breakpoint() { if (!initialized) return; asm(" .globl _breakinst _breakinst: ta 1 "); } The equivalent code in .../gdb-5.0/gdb/i386-stub.c is: #define BREAKPOINT() asm(" int $3"); /* This function will generate a breakpoint exception. It is used at the beginning of a program to sync up with a debugger and can be used otherwise as a quick means to stop program execution and "break" into the debugger. */ void breakpoint() { if (initialized) BREAKPOINT(); } which kind of nicely ties in with the existing Linux code in xcDll.cpp
Status: NEW → ASSIGNED
This is awkward, I can get it to halt on the specified module, but I can't resume execution. Doing a cont in gdb just finds the breakpoint again, and both next and step hang. What I found in the /usr/include/sys/signal.h on solaris is #define SIGTRAP 5 /* trace trap (not reset when caught) */ This seems to be different on linux, at least I don't find a comment like this there. Rich, can you ping your channels? Diff attached Axel
Alex, couple of things: 1/ The breakpoint() function in the gdb source included a .globl label as well (see my previous comment). Have you tried including that and see what happens. 2/ When you create a patch, could you use the cvs diff -u format please, so that there is some context for the changes? Thanks.
I just tried the full multiline statement. Other than an extra warning, I see no difference. Tested both against gdb5.0 and 4.17 on Solaris 2.7 richb, do you need an extra diff for this? No wisdom there but cut&paste. Axel
Axel, I'm not going to get to this any time soon (we have a PR2 release coming up), so I'm not likely to be able to try anything for a few weeks. I suggest getting a copy of the gdb 5.0 source code, compile it up on your SPARC machine, and by adding debug messages (how do you debug a debugger ;-) see if you can see how gdb solves this problem.
Updating QA Contact.
QA Contact: leger → hong
changing qa contact to george.drapeau@eng.sun.com; please reassign as necessary.
QA Contact: hong → george.drapeau
Setting QA contact to Sun QA lead.
QA Contact: george.drapeau → raghu
Reassigning to Ed to do with as he wants.
Assignee: rich.burridge → edburns
Status: ASSIGNED → NEW
QA Contact: raghu → avm
I've asked Dauphin to take a look at this.
Status: NEW → ASSIGNED
Assignee: edburns → nobody
Status: ASSIGNED → NEW
QA Contact: avm → xpcom
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: