Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verlässliche Systemsoftware
projects
osv
Commits
4cda9ad1
Commit
4cda9ad1
authored
12 years ago
by
Avi Kivity
Browse files
Options
Downloads
Patches
Plain Diff
gdb: adjust for release builds
Look up the build directory from the running object.
parent
0ac3dd15
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/loader.py
+4
-1
4 additions, 1 deletion
scripts/loader.py
with
4 additions
and
1 deletion
scripts/loader.py
+
4
−
1
View file @
4cda9ad1
...
@@ -5,6 +5,9 @@ import re
...
@@ -5,6 +5,9 @@ import re
import
os
,
os
.
path
import
os
,
os
.
path
import
struct
import
struct
build_dir
=
os
.
path
.
dirname
(
gdb
.
current_objfile
().
filename
)
external
=
build_dir
+
'
/../../external
'
def
load_elf
(
path
,
base
):
def
load_elf
(
path
,
base
):
args
=
''
args
=
''
text_addr
=
'
?
'
text_addr
=
'
?
'
...
@@ -31,7 +34,7 @@ def load_elf(path, base):
...
@@ -31,7 +34,7 @@ def load_elf(path, base):
def
translate
(
path
):
def
translate
(
path
):
'''
given a path, try to find it on the host OS
'''
'''
given a path, try to find it on the host OS
'''
name
=
os
.
path
.
basename
(
path
)
name
=
os
.
path
.
basename
(
path
)
for
top
in
[
'
build
/debug
'
,
'
external
'
,
'
/usr
'
]:
for
top
in
[
build
_dir
,
external
,
'
/usr
'
]:
for
root
,
dirs
,
files
in
os
.
walk
(
top
):
for
root
,
dirs
,
files
in
os
.
walk
(
top
):
if
name
in
files
:
if
name
in
files
:
return
os
.
path
.
join
(
root
,
name
)
return
os
.
path
.
join
(
root
,
name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment