Debugging Fennec on Mac is busted

RESOLVED FIXED in Firefox 49

Status

RESOLVED FIXED
3 years ago
7 months ago

People

(Reporter: snorp, Unassigned)

Tracking

unspecified
mozilla49

Firefox Tracking Flags

(firefox49 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

It tries to run lldb instead of jimdb
Created attachment 8740736 [details] [diff] [review]
Always use gdb for debugging Fennec
Attachment #8740736 - Flags: review?(gbrown)
Comment on attachment 8740736 [details] [diff] [review]
Always use gdb for debugging Fennec

Review of attachment 8740736 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks. I wish I had a Mac so I could catch these things.

::: python/mozbuild/mozbuild/mach_commands.py
@@ +1174,5 @@
>  
>          if debug or debugger or debugparams:
>              import mozdebug
> +            if conditions.is_android(self):
> +                debugger = 'gdb'

This is a little "extreme", but probably okay. I'm a little concerned that someone will try to use the --debugger argument for something reasonable (point to their own gdb?) and will be puzzled that it doesn't have any affect, but trying to support --debugger on Android may just be a foot-gun.
Attachment #8740736 - Flags: review?(gbrown) → review+
This seems like it'd be a better fit inside `get_default_debugger_name`, which would actually fix it for all the consumers of mozdebug (the test harnesses, etc).

Updated

3 years ago
Component: mach → Build Config
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> This seems like it'd be a better fit inside `get_default_debugger_name`,
> which would actually fix it for all the consumers of mozdebug (the test
> harnesses, etc).

It does make more sense there, but AFAICT there is no way to figure out that we're building for Android there.
I looked at this a bit, and I think there's a straightforward fix. `get_default_debugger_name` is using `mozinfo.os` right now:
https://dxr.mozilla.org/mozilla-central/rev/ae7413abfa4d3954a6a4ce7c1613a7100f367f9a/testing/mozbase/mozdebug/mozdebug/mozdebug.py#177

If we change that to first call `mozinfo.find_and_update_from_json()` and then instead use `mozinfo.info['os']`, it will return "android" for android builds, and then this will actually just work the way it's intended to work:
https://dxr.mozilla.org/mozilla-central/rev/ae7413abfa4d3954a6a4ce7c1613a7100f367f9a/testing/mozbase/mozdebug/mozdebug/mozdebug.py#66
Created attachment 8746034 [details] [diff] [review]
Fix Fennec debugging on Mac
Attachment #8746034 - Flags: review?(ted)
Attachment #8740736 - Attachment is obsolete: true
Attachment #8746034 - Flags: review?(ted) → review+

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6fb68d7db94d
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49

Updated

7 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.