Closed Bug 996823 Opened 10 years ago Closed 10 years ago

mach interferes with ctrl-c when running with gdb

Categories

(Firefox Build System :: Mach Core, enhancement)

x86
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla32

People

(Reporter: jrmuizel, Assigned: glandium)

References

Details

Attachments

(1 file)

Sometimes when using gdb with mach reftest --debugger=gdb I'll get a message like:
mach interrupted by signal or user action. Stopping.

This causes pain.
I guess the solution here is to setup a handler for SIGINT and forward that to gdb?
This is causing pain for me too. 

Ctrl-C causes mach to exit and locks my terminal tab, but doesn't break the debugger or kill it.

Would like a way to workaround this at least so I can debug reftests again.
Flags: needinfo?(gps)
You'll have to change each mach command not reacting properly to ctrl-c to swallow KeyboardInterrupt. We may want to consider a per-command option to ignore KeyboardInterrupt, since this is likely a common pattern.

Better yet, whatever the mach command invokes should swallow KeyboardInterrupt.
Flags: needinfo?(gps)
I use |./mach debug| on Mac. After hitting Ctrl-C, it prints "mach interrupted by signal or user action. Stopping.", and lldb is terminated.

The expect behavior should be sending Ctrl-C to the debugger. Is there any attempt to resolve this issue?
Is this going to be fixed?

EXTRA_TEST_ARGS='--debugger=lldb' make reftest doesn't seem to work any more either.
Flags: needinfo?(gps)
gps is away.
Flags: needinfo?(gps) → needinfo?(mh+mozilla)
1) In my experience, mach debug has negative usefulness because of that. I think it should be plain removed until this is fixed.

2) Why does mach debug have to keep running while GDB is running? Why can't mach debug just exec GDB and be done?
Arguably, that should be done for the non-pass_thru case. There's really no reason not
to leave it to subprocesses to decide what they want to do on Ctrl-C, and get the python
code get back on a code path as if the subprocess terminated normally. But I don't feel
like I want to touch mozbase.
Attachment #8426753 - Flags: review?(mshal)
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(mh+mozilla)
Attachment #8426753 - Flags: review?(mshal) → review+
https://hg.mozilla.org/mozilla-central/rev/60793d877475
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: