# -*- python -*-
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import gdb
import os
import os.path
pythondir = '/opt/TuxamitoSoftToolchains/arm-arm1176jzfssf-linux-gnueabi/gcc-4.6.4/share/gcc-4.6.4/python'
libdir = '/opt/TuxamitoSoftToolchains/arm-arm1176jzfssf-linux-gnueabi/gcc-4.6.4/arm-arm1176jzfssf-linux-gnueabi/lib'
# This file might be loaded when there is no current objfile. This
# can happen if the user loads it manually. In this case we don't
# update sys.path; instead we just hope the user managed to do that
# beforehand.
if gdb.current_objfile () is not None:
# Update module path. We want to find the relative path from libdir
# to pythondir, and then we want to apply that relative path to the
# directory holding the objfile with which this file is associated.
# This preserves relocatability of the gcc tree.
# Do a simple normalization that removes duplicate separators.
pythondir = os.path.normpath (pythondir)
libdir = os.path.normpath (libdir)
prefix = os.path.commonprefix ([libdir, pythondir])
# In some bizarre configuration we might have found a match in the
# middle of a directory name.
if prefix[-1] != '/':
prefix = os.path.dirname (prefix) + '/'
# Strip off the prefix.
pythondir = pythondir[len (prefix):]
libdir = libdir[len (prefix):]
# Compute the ".."s needed to get from libdir to the prefix.
dotdots = ('..' + os.sep) * len (libdir.split (os.sep))
objfile = gdb.current_objfile ().filename
dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir)
if not dir_ in sys.path:
sys.path.insert(0, dir_)
# Load the pretty-printers.
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (gdb.current_objfile ())
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Linux系统移植:根文件系统 (539个子文件)
libsqlite3.so.0 559KB
libpthread.so.0 82KB
libgcc_s.so.1 159KB
libnsl.so.1 70KB
libcrypt.so.1 34KB
librt.so.1 26KB
libthread_db.so.1 26KB
libanl.so.1 10KB
libutil.so.1 10KB
libBrokenLocale.so.1 5KB
libstdc++.so.6.0.16 623KB
libjpeg.so.8.0.2 1.05MB
libresolv.so.2 74KB
libnss_files.so.2 46KB
libnss_nisplus.so.2 46KB
libnss_nis.so.2 38KB
libnss_compat.so.2 26KB
libnss_hesiod.so.2 18KB
libnss_dns.so.2 18KB
libdl.so.2 10KB
libnss_db.so.2 6KB
ld-linux.so.3 127KB
libc.so.6 1.15MB
libstdc++.so.6 623KB
libsqlite3.so.0.8.6 559KB
libm.so.6 422KB
libjpeg.so.8 1.05MB
[ 1.8MB
[[ 1.8MB
libjpeg.a 1.56MB
acpid 1.8MB
add-shell 1.8MB
addgroup 1.8MB
adduser 1.8MB
adjtimex 1.8MB
app 0B
arp 1.8MB
arping 1.8MB
ash 1.8MB
.ash_history 10KB
awk 1.8MB
base64 1.8MB
basename 1.8MB
beep 1.8MB
blkid 1.8MB
blockdev 1.8MB
boa 61KB
bootchartd 1.8MB
brctl 1.8MB
bunzip2 1.8MB
busybox 1.8MB
bzcat 1.8MB
bzip2 1.8MB
cal 1.8MB
capture 63KB
cat 1.8MB
catv 1.8MB
sql1.cgi 83KB
cgictest.cgi 79KB
env1.cgi 72KB
env2.cgi 70KB
wifi.cgi 67KB
setEnv.cgi 67KB
m0_fan.cgi 67KB
m0_seg.cgi 67KB
m0_beep.cgi 67KB
picture2.cgi 67KB
picture1.cgi 67KB
login.cgi 67KB
set_sms.cgi 64KB
m0_led.cgi 64KB
capture1.cgi 64KB
delete.cgi 63KB
chat 1.8MB
chattr 1.8MB
chgrp 1.8MB
chmod 1.8MB
chown 1.8MB
chpasswd 1.8MB
chpst 1.8MB
chroot 1.8MB
chrt 1.8MB
chvt 1.8MB
cksum 1.8MB
clear 1.8MB
cmp 1.8MB
comm 1.8MB
boa.conf 7KB
wpa-psk-tkip.conf 232B
resolv.conf 51B
conspy 1.8MB
cp 1.8MB
cpio 1.8MB
crond 1.8MB
crontab 1.8MB
cryptpw 1.8MB
cttyhack 1.8MB
cut 1.8MB
RT2870STA.dat 1KB
date 1.8MB
共 539 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
cnhui2016
- 粉丝: 204
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功