资源简介
MinGW 是一个可自由使用和自由发布的Windows特定头文件和使用GNU工具集导入库的集合,允许你在GNU/Linux和Windows平台生成本地的Windows程序而不需要第三方C运行时库。
代码片段和文件信息
# -*- 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 .
import sys
import gdb
import os
import os.path
pythondir = ‘/mingw/share/gcc-4.6.2/python‘
libdir = ‘/mingw/lib/gcc/mingw32/4.6.2‘
# 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 ())
- 上一篇:MinGW64离线安装包
- 下一篇:京瓷 6500i 8000i 维修手册.pdf
相关资源
- MinGW64离线安装包
- tdm64-gcc-5.1.0-2
- OpenCV 3.3_x86_minGW_world
- Suse Linux 12 下gcc环境所需rpm安装包
- mingw编译的opencv库
- 广联达深思S4全国写锁工具+582 586 58
- 最新版MinGW + yasm + ffmpeg编译环境大全
- qtcreator-gdb-7.4-MINGW32_NT-6.1-i686.tar QT4 调
- codeblocks-20.03mingw-setup.exe
- gcc6.3.0版本的mingw离线安装压缩包
- Go的mac版本:go1.13.1.darwin-amd64.pkg
- gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz
- Postman Mac版本
- gcc离线安装包
- gcc6.2.0以及对应的gmp 、mpfr、mpc
- gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-
- mingw64-8.1.0.zip
- arm-none-linux-gnueabi-gcc-4.8.3
- arm-linux-gcc交叉编译器安装包及详细安
- gcc离线安装全部依赖包
- modelsim-gcc-4.5.0-mingw64for 64位windows
- QWT-6.1.3移植源码以及编译好的MSVC和
- gcc-3.4.6-sol10-sparc-local
- CMake编译opencv mingw版本
- NeHe_OpenGL_VC版本1-48课全部教程以及源
- 全景图拼接软件PTGui.Pro.v9.0,mac版本
- gcc-3.4.6-sol10-x86-local.part1
- 国家电网有限公司标识应用手册2018版
- tdm64-gcc-5.1.0-2 64位
- linux centos7_64 gcc依赖安装包
评论
共有 条评论