Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
1 vote
1 answer
62 views

Consider a type like #include <type_traits> template<typename T> struct Foo { std::remove_cv_t<T> m; }; which uses a type trait to deduce the type of one of its members from a ...
ComicSansMS's user avatar
  • 55.9k
0 votes
0 answers
59 views

Since gdb has only one global set print elements that affects all array-like types, it has been necessary to use a very short value like set print elements 4. But in certain specific cases it can be ...
Byron Hawkins's user avatar
1 vote
0 answers
53 views

I am trying to print the value of a member variable of a structure instantiated in the caller function as below. While the read_var on older() frame works for the structure variable itself, it doesn't ...
Mashy's user avatar
  • 21
0 votes
1 answer
67 views

Pretty much what the question says. Context: in cuda-gdb, if you have a templated struct and want to know what type it is, you will get something like this: @something mangled_name. I want to write a ...
Saitama10000's user avatar
0 votes
0 answers
806 views

all buttons non active I'm trying to set up remote debugging for my application on Windows using Ghidra and GDBServer. trying_connect_to_gdb GDB successfully connects to GDBServer. However, when I ...
TechRobs's user avatar
0 votes
0 answers
132 views

tl,tr: Find memory address of an uncalled function, without having source code(or having function name) in gdb. Issue: given a source code given to me, which looks like this: #include<stdio.h> ...
nastya's user avatar
  • 1
0 votes
1 answer
74 views

I have the following C++ code: main.cpp: #include "a.h" int main(){ int x[3]; some_macro(x) // comment // comment return x[2]; } a.h: template <typename T> inline ...
Ruba Rushrush's user avatar
0 votes
0 answers
786 views

I want to open a GDB (A directory that ends with ".gdb") in R. I am assuming that some sublayers or the whole GDB is compressed, though I do not know how to confirm this. I have tried ...
m4D_guY's user avatar
  • 198
2 votes
1 answer
167 views

I thought it would be cool to add a command to gdb that will look at the instruction pointer and overwrite the current instruction with NOPs. The idea being that if you are debugging, and your program ...
Joseph Garvin's user avatar
0 votes
1 answer
35 views

I am writing a python gdb extension. Given the address of a structure, I would like to read the core file and obtain a gdb.Value object out of it. How do I go about doing that?
Mayank's user avatar
  • 23
0 votes
0 answers
27 views

enter image description here gdb opens a local file and points to mian function without using a script. I hope this script I wrote will point to main function as well,Another question is does gdb ...
Yyuu MW's user avatar
0 votes
1 answer
249 views

I'm trying to memset the data at some address in a gdb session. Lets say it is initially filled with 1's and I'm trying to overwrite it with 0's. (gdb) set $i = (int*)malloc(sizeof(int)) (gdb) set *$...
cheater's user avatar
  • 53
0 votes
1 answer
268 views

With GDB and Python I tried to get the char* value on x1 register python a= gdb.execute("x/s $x1", to_string=True) print(a) end But I got 0xbb4aaa: "SomeString" I want to ...
python3.789's user avatar
0 votes
1 answer
187 views

I have some program, the essence of which is to analyze crashes, it works with GDB. An example of how it works: I run an application in GDB which I want to analyze for crashes, then I load my program ...
Monere Morgul's user avatar
0 votes
1 answer
3k views

Code is working it is importing my files and exporting into .glb format but issue when i open glb file it dose not contain texture image it shows grey... here is my code import bpy import os dir_path ...
Arav Instance's user avatar
0 votes
0 answers
38 views

As an example lets say I have a linked list implemented in C. Can I use the GDB python API to implement a custom array access operator so that I can get a value from the list like myList[0] while ...
Bob's user avatar
  • 116
0 votes
0 answers
125 views

I need a c++ script to automate GDB debugging another c++ program. the c++ script has to be able to run gdb commands and get the results from it and use it inside the script to save variable values ...
Mohammad Jalili's user avatar
1 vote
1 answer
724 views

there may very well be an answer to this question, but it's really hard to google for. you can add commands to gdb by writing them in python. I am interested in debugging one of those python scripts ...
stu's user avatar
  • 8,875
0 votes
0 answers
62 views

I have written a small python script that adds new commands to gdb and for others to use it, they can just source the python file in their ~/.gdbinit, but I would now like to add some useful aliases ...
anirudh's user avatar
  • 4,196
1 vote
2 answers
874 views

What I'm trying to do is ask the user for a type of math operator(Not sure if I used the correct term. I'm new to python.), and use that in place of a math operator in an equation. Here I tried: ...
Derpy Gamer's user avatar
0 votes
0 answers
177 views

There is gdb.lookup_type("SomeType") in GDB python API as listed blow, but I cannot find a way to get the source file and line number where the type is defined, much like what the GDB ...
Thomson's user avatar
  • 21.9k
2 votes
0 answers
341 views

I'd like to call print('somestr') in a python script called in GDB ((gdb) source my_script.py), and style the output in console colors. I tried the python colorama package which works in terminal, ...
Thomson's user avatar
  • 21.9k
0 votes
0 answers
162 views

I've loaded up two versions of a C++ library in gdb, opened up the built-in Python interpreter, and run import gdb gdb.lookup_type('Foo<Bar>') In one version, it works just fine. However, in ...
Daniel Walker's user avatar
0 votes
0 answers
66 views

I am creating a GDB TUI python extension for embedded debugging. The python script is being run by the GDB. Trying to create a handler for register_changed event in GDB according to the documentation ...
peter_esp's user avatar
0 votes
1 answer
849 views

I am trying to debug an aarch64 Linux kernel loaded in QEMU from x86 host. When 'lx-symbols' command executed for loading the symbols from gdb, it has shown Undefined command: "lx-symbols" ...
Little Tree's user avatar
1 vote
2 answers
335 views

I want to pretty print this struct struct MyStruct { char buffer[16]; }. Depending on buffer[15] I want to print buffer as a 10 byte string or treat it as a pointer. The 10 byte case is simple and ...
Andrew Benor's user avatar
1 vote
1 answer
219 views

I'm writing a GDB script in python to print some debug information of the application. The thing is multiple architectures are supported: x86, alpha, aarch64, and probably some more later. The ...
Some Name's user avatar
  • 9,730
0 votes
1 answer
166 views

I have a Python program that is feeding JSON input to a binary running in GDB which then reads that input using the C function fread(). The problem is that fread() needs a EOF/Ctrl-D to stop reading ...
Ben S's user avatar
  • 1
0 votes
1 answer
559 views

I recently compiled gdb to 12.1 and attempted to install gef via the following cmd bash -c "$(curl -fsSL https://gef.blah.cat/sh)" the code on line 52 in the image is import abc the ...
pi0's user avatar
  • 1
0 votes
0 answers
258 views

I am trying to make some automation testing with an embedded application running in an ARM Microcontroller. For the I/O exchange I have setup the Semihosting using arm-none-eabi-gdb as GDB client: ...
luca zambuto's user avatar
2 votes
0 answers
152 views

Suppose I have a class: class RawMessage(NamedTuple): data: Dict timestamp: float ... The keys and values in this dictionary are probably all integers, but I don't want to state that with ...
awy's user avatar
  • 43
1 vote
0 answers
1k views

I need to run gdb with python script, like ~/.gdb/qtprinters.py which require a high version python. our system gdb use default python version 2.7 and I installed a new gdb in my home with version 12....
BruceSun's user avatar
  • 166
2 votes
0 answers
370 views

I want to put a breakpoint in a Linux share library in specific offset ( in libTest.so in function 0x1234 ) while I debugging with GEF GDB. But I want to put it with gdb script. If I run vmmap ...
Polo1990's user avatar
2 votes
1 answer
246 views

I have a few complex classes generated by a third party domain-specific tool. The classes are complex because the tool tries to be generic as much as possible, so that I was asked to design a GDB ...
Home of the Brave's user avatar
0 votes
0 answers
72 views

In gdb currently I can print the contents of a container, such as std::list, which contains a structure type. This type, however, is quite large and I need only values of some selected fields in every ...
Ethouris's user avatar
  • 1,921
1 vote
0 answers
124 views

I have a structure that wraps a std::map, whcih gdb knows how to pretty-print. I want to write a custom pretty-printer (with python), that delegates to the inner std:::map and maybe shows the count of ...
Ben Müker's user avatar
0 votes
1 answer
317 views

In gdb's Values From Inferior documentation, there's a second constructor for creating objects within python. It states: Function: Value.__init__ (val, type) This second form of the gdb.Value ...
Adrian's user avatar
  • 11.1k
4 votes
2 answers
455 views

I'm writing a pretty printer in python for gdb, and am slowly getting the hang of the methodology. Trying to find actual documentation as to how this system works with examples of what is expected ...
Adrian's user avatar
  • 11.1k
1 vote
0 answers
327 views

Can I install a python package with binary extension compiled with debug symbols when using poetry? For example, this way a gdb or py-spy will get the necessary pretty-printing output
Ojomio's user avatar
  • 1,063
0 votes
0 answers
319 views

I want to get the address from a value in the same way that the x examine command works. Internally, this seems to use value_as_address, which turns any gdb expression into a core address. I have not ...
Yet Another User's user avatar
2 votes
0 answers
232 views

I have a python server running (cherrypy webserver). When a URL /a is hit, it uses ctypes to call a C library function. The library function is causing a seg-fault which results in the python server ...
lucifer's user avatar
  • 409
1 vote
1 answer
421 views

I'm trying to find a way to get a list of members of a c++ class object from the python api in GDB. So far, the only solution I've been able to find has been to use the ptype <value> and then ...
anirudh's user avatar
  • 4,196
0 votes
1 answer
791 views

i'm currently working on an ubuntu 18.0.4.5 machine and i've been trying to figure out the whole kernel debugging process. I've stumbled upon the need to auto run GDB scripts along with the vmlinux ...
sharlit mals's user avatar
0 votes
0 answers
218 views

As mentioned in a previous question (How to examine a gdb.Type) I'm writing some specialized gdb scripting in python. I want to call a function pointer, obtained from the inferior process, on a value, ...
John Aspinall's user avatar
3 votes
2 answers
1k views

Suppose I have the following C++: template <int I> int bar(int i) { ++i; label1: return I * i; } int main(int argc, char **) { return bar<2>(argc); } Is it possible to set a gdb ...
Luke Peterson's user avatar
1 vote
0 answers
346 views

I'm writing some specialized gdb scripting in python, and I have some questions about the gdb.Type class. I see a lot of methods for producing related types, like Type.const and Type.volatile, but ...
John Aspinall's user avatar
2 votes
1 answer
1k views

I tried to set watch into address (gdb) watch 0x7536546 but I got an error Warning: Could not insert hardware watchpoint 6. Could not insert hardware breakpoints: You may have requests too many ...
MicrosoctCprog's user avatar
0 votes
2 answers
625 views

(gdb) source script.py loaded script file to GDB How to unload that script? How to unload all loaded script or view all script that loaded ?
user13145920's user avatar
0 votes
1 answer
371 views

When I want to run python into gdb I using source /tmp/gdb/tmp/parser.py Can I set an alias so in the next time I want to call this script I use only parser.py or parser (without setting the script ...
MicrosoctCprog's user avatar
9 votes
2 answers
3k views

There are lots of coroutines in my production code, which are stuck at unknown position while processing request. I attached gdb with Python support extension to the process, but it doesn't show the ...
shoraii's user avatar
  • 91