gdb

How can I get the lua stack trace from a core file using gdb

谁说我不能喝 提交于 2020-12-27 08:51:32
问题 I have a C++ application (for OS X) that calls lua as a scripting language. I'm running a large number of these applications (100s) and they can run for a very long time (days or weeks). Sometimes one crashes. And when it crashes it leaves me a lovely core file. I can open this core file in gdb and find where the application crashes. I can walk the call stack and find an instance of a lua_State variable. My problem is that I'd like to see what the lua call stack looks like at this time...

How can I get the lua stack trace from a core file using gdb

三世轮回 提交于 2020-12-27 08:51:01
问题 I have a C++ application (for OS X) that calls lua as a scripting language. I'm running a large number of these applications (100s) and they can run for a very long time (days or weeks). Sometimes one crashes. And when it crashes it leaves me a lovely core file. I can open this core file in gdb and find where the application crashes. I can walk the call stack and find an instance of a lua_State variable. My problem is that I'd like to see what the lua call stack looks like at this time...

TRACE32 Simulator License

三世轮回 提交于 2020-12-26 19:08:46
链接: https://www.lauterbach.com/frames.html?sim_license.html Which Features of the TRACE32 Instruction Simulator need a TRACE32 Simulator License? The following features are affected: Larger PRACTICE scripts running on the TRACE32 Instruction Simulator. Controlling the TRACE32 Instruction Set Simulator via the TRACE32 Remote API. Controlling the TRACE32 Instruction Set Simulator via a third-party tool integration. Controlling the TRACE32 Instruction Set Simulator as a TCF agent. Controlling the TRACE32 Instruction Set Simulator via the TRACE32 GDB API. When is a TRACE32 Simulator License needed

Linux not respecting SCHED_FIFO priority ? ( normal or GDB execution )

旧时模样 提交于 2020-12-26 19:01:51
问题 TL;DR On multiprocessors/multicores engines, more than one RT SCHED_FIFO threads may be scheduled on more than one execution unit. So thread with priority 60 and thread with priority 40 may run simultaneously on 2 different cores. This may be counter-intuitive, especially when simulating embedded systems that (often as today) run on single core processors and rely on strict priority execution. See my other answer in this post for summary Original problem description I have difficulties even

Linux not respecting SCHED_FIFO priority ? ( normal or GDB execution )

China☆狼群 提交于 2020-12-26 19:01:48
问题 TL;DR On multiprocessors/multicores engines, more than one RT SCHED_FIFO threads may be scheduled on more than one execution unit. So thread with priority 60 and thread with priority 40 may run simultaneously on 2 different cores. This may be counter-intuitive, especially when simulating embedded systems that (often as today) run on single core processors and rely on strict priority execution. See my other answer in this post for summary Original problem description I have difficulties even

Kali安装备忘

孤人 提交于 2020-12-25 20:06:18
Kali版本 对CTF来说,Kali的直接Root用户登陆肯定是最方便的。2020版本安装时还要设置一个普通用户名,背叛了Geek的精神!而且2020没有Light版本,只能网络安装或下载全版本的ISO文件,简直多余,因此最优是2019.4的light 虚拟机 VMware至少要用15版本的,不然在高分屏下的显示非常小。15可以进行屏幕拉伸,Kali安装完成后,还可以在setting-display等地方设置分辨率、缩放因子等。最为方便的是安装VMware tools后,可以双向复制粘贴、目录共享。 Visualbox使用起来不太方便,只能“分离启动”就不提了,关键是安装增强工具后,也不能完成目录共享,折腾了很久的 mount -t vboxfs ...... ,最后放弃。 软件安装 安装后要把系统源、PIP改到阿里云,然后apt update,随后还要安装 aptitude,在apt下无法安装的gcc等可以通过aptitude完成。根据pwn的需要主要安装的工具有upx、gdb(及peda插件)、pip、fcrackzip、java、netcore、php、uncompyle6等。据说edb是linux下不错的调试器,以后再试。 相当长时间内不要考虑的是pwn相关的内容,如:pwntools、Metasploit。 相反逆向移动开发相关的内容可以后续跟进。 来源: oschina

go runtime debug 小技巧

依然范特西╮ 提交于 2020-12-24 15:49:01
前言 本意是打算研究一下go程序的启动流程,然后就去网上搜索了一下入门教程。结果令我有点沮丧,搜到的几乎所有文章开篇都是通过 GDB 调试, 然后就是不同平台下的汇编代码。。。 这令我很不开心, 虽然C/C++应用很广泛, 但是我对它真的没啥兴趣啊, 对它相关的调试工具就更加不感冒了, 虽然它可以调试go程序, 但是总感觉心里少了点什么, 难道 dlv 它不香嘛, 于是就有了今天这篇文章。 dlv命令行debug dlv的名头应该不用我多说, 所以我们直奔主题 1. 开始debug dlv debug test.go 执行上述命令后, 就会进入debug交互命令行界面, 在这个界面任何时候输入 h 都会打印帮助信息. 2. 增加函数断点 交互界面输入下面命令后,会在main包下的main函数打上一个断点 b main.main 3. 指定行断点 在test.go的文件第6行打上一个断点 b test.go:6 4. 开始执行 如上图所示, 我们继续执行时会发现 => 会停留在我们前面标记的断点处。这里的其他命令我们在本篇文章不做过多的介绍了, 我们尽量紧扣本篇的主题。 5. 打印调用栈 如上图所示, 我们通过dlv的调用栈可以看见调用main函数之前,还执行了asm_amd64.s(本次debug的机器为mac)的汇编代码和proc.go的main函数。 意外之喜,

NJU计算机系统基础-PA0总结

你说的曾经没有我的故事 提交于 2020-12-23 09:50:24
这是第0次开发环境搭建的实验,主要目的是熟悉在Linux环境下进行开发。这是 程序员必会的一项技能 ,官方给的学习时间是10h 主要包括以下内容: 1. 官方建议体验在物理机上装Linux 2. 安装装机必备的编译软件,熟悉vim,配置vim环境, 同时熟悉必要的命令和shell脚本 3. 体验在vim下进行C开发以及gdb调试 4. 学习tmux以及git 5. 使用git客隆项目,并成功搭建开发环境 其中提到了两个重要的方法,查询官方手册和谷歌搜搜(不是百度) 来源: oschina 链接: https://my.oschina.net/u/4392886/blog/4830631

HaaS100开发调试系列 之 如何使用J-Link仿真器调试代码

守給你的承諾、 提交于 2020-12-22 12:02:32
1、前言 今年阿里云官方推出的HaaS100开发板引起了嵌入式开发者的极大关注,阿里云IOT部门提供的开发者7*24小时咨询答疑服务,也受到了广大开发人员的欢迎。 在钉钉开发者群里,很多爱好者问了下面的问题: 在基于AliOS Things 的RTOS上,HaaS100上如何开发调试? AliOS Things的shell 系统是什么样的? 如何获得系统内存大小? 为了解答这些开发调试相关的问题,我们给大家带来了《带你上手HaaS100 开发调试》系列,计划推出一系列文章,帮助开发者进一步了解AliOS Things,了解HaaS100,从而快速开发应用。 今天首先推出的是 HaaS100 J-Link仿真器的连接和使用。 对于嵌入式开发者来说,使用仿真器进行代码调试是很常见的操作,关于仿真器的原理网上也有很多的学习资料,这里不再赘述,直接上正文。 2、HaaS100如何连接仿真器 2.1、连接方法 HaaS100支持SWD接口连接仿真器,如图所示: 排针的引脚定义如下 连接步骤为: 1、按照图中所示用线将SWDIO(图中白色线)、SWCLK(图中紫色线),加上电源3V3(使用排针1脚或2脚)和地GND(图中黑色线,或者排针上任一GND均可)共四根线与仿真器连接。笔者使用的是较常见的V9仿真器,如下图: 2、上电,打开Jlink GDB Server,笔者使用的是SEGGER

window模拟linux环境-cygwin安装

百般思念 提交于 2020-12-22 07:46:04
cygwin是一个在windows平台上运行的unix模拟环境,它对于学习unix/linux操作环境,或者从unix到windows的应用程序移植,非常有用。通过它,你就可以在不安装linux的情况下使用NDK来编译C、C++代码了,还可以运行一些在Linux下才能运行的命令行。 下面我们一步一步的安装cygwin: 一、下载地址: http://cygwin.com/install.html 二、 1、下载完全之后打开安装界面,点击下一步,会出现三个安装方式: 1)Install from Internet:直接从Internet上下载并立即安装(安装完成后,下载好的安装文件并不会被删除, 而是仍然被保留,以便下次再安装)。 2)Download Without Installing:只是将安装文件下载到本地,但暂时不安装。 3)Install from Local Directory:不下载安装文件,直接从本地某个含有安装文件的目录进行安装。 一般选择第一个。 2、下一步,选择安装cygwin的目录 3、下一步,选择要下载的安装包的目录 4、下一步,此时共有三种连接方式选择: 1) Direct Connection:直接连接。 2) Use IE5 Settings:使用IE的连接参数设置进行连接。 3) Use HTTP/FTP Proxy