New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow running headless.py in a debugger. #3468

Merged
merged 3 commits into from Jan 4, 2019

Conversation

Projects
None yet
3 participants
@nical
Copy link
Collaborator

nical commented Jan 4, 2019

Set the environment variable DEBUGGER to either "gdb", "cgdb", "rust-gdb" or "rr" and run headless.py.
Example: DEBUGGER=rr ./script/headless.py rawtest


This change is Reviewable

@nical nical force-pushed the nical:headless-dbg branch from 3c04515 to 08e1348 Jan 4, 2019

Allow running headless.py in a debugger.
Det the environment variable DEBUGGER to either gdb, cgdb, rust-gdb or rr and run headless.py.
Example: 'DEBUGGER=rr ./script/headless.py rawtest'

@nical nical force-pushed the nical:headless-dbg branch from 08e1348 to b1b5377 Jan 4, 2019

@nical

This comment has been minimized.

Copy link
Collaborator

nical commented Jan 4, 2019

While I'm at it I added a way to use debug builds by setting "OPTIMIZED" to either "0" or "false".

@emilio

emilio approved these changes Jan 4, 2019

Copy link
Member

emilio left a comment

Looks good, I need to admit that I've tweaked this script way too often to make it use the debug binaries :)

Not sure if using env variables vs. arguments is better (I think I'd lean for the later for consistency with mach, so you could use it like headless.py --debug --debugger=rr or such).

But I don't think it's worth spending a lot of time on that, we can easily change this in the future.

if use_rr():
dbg_cmd = ['rr', 'record']
elif use_gdb():
dbg_cmd = [debugger(), '--args']

This comment has been minimized.

@emilio

emilio Jan 4, 2019

Member

Maybe something like the following would be worth it:

Suggested change Beta
dbg_cmd = [debugger(), '--args']
dbg_cmd = [debugger(), '--args']
elif debugger():
print("Unknown debugger: {}".format(debugger())
sys.exit(1)
Allow running debug builds in headless.py
Setting the environment variable "OPTIMIZED" to "0" or "false" will use a debug build instead of a release build.

@nical nical force-pushed the nical:headless-dbg branch from fb3df90 to f73ca45 Jan 4, 2019

@nical nical force-pushed the nical:headless-dbg branch from f73ca45 to 31c2cfb Jan 4, 2019

@emilio

This comment has been minimized.

Copy link
Member

emilio commented Jan 4, 2019

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jan 4, 2019

📌 Commit 31c2cfb has been approved by emilio

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jan 4, 2019

⌛️ Testing commit 31c2cfb with merge 1225013...

bors-servo added a commit that referenced this pull request Jan 4, 2019

Auto merge of #3468 - nical:headless-dbg, r=emilio
Allow running headless.py in a debugger.

Set the environment variable DEBUGGER to either "gdb", "cgdb", "rust-gdb" or "rr" and run headless.py.
Example: `DEBUGGER=rr ./script/headless.py rawtest`

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/3468)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jan 4, 2019

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: emilio
Pushing 1225013 to master...

@bors-servo bors-servo merged commit 31c2cfb into servo:master Jan 4, 2019

3 checks passed

Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details

@nical nical deleted the nical:headless-dbg branch Jan 4, 2019

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 4, 2019

Bug 1517721 - Update webrender to commit 12250134e710e8a0435b1b678fa4…
…fb056e11fecc (WR PR #3468). r=kats

servo/webrender#3468

Differential Revision: https://phabricator.services.mozilla.com/D15726

--HG--
extra : moz-landing-system : lando

mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Jan 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment