no type named uint16 in rust
See original GitHub issueDescription
So, I think I correctly installed pwndbg on my system, when I run simple rust code like this:
use std::io;
fn main() {
let mut input = String::new();
io::stdin().read_line(&mut input);
}
And I try to debug it using gdb with pwndbg I got this problem:
Traceback (most recent call last):
File "/usr/share/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/usr/share/pwndbg/pwndbg/typeinfo.py", line 51, in update
module.ushort = lookup_types('unsigned short', 'ushort', 'u16', 'uint16')
File "/usr/share/pwndbg/pwndbg/typeinfo.py", line 39, in lookup_types
raise exc
File "/usr/share/pwndbg/pwndbg/typeinfo.py", line 36, in lookup_types
return gdb.lookup_type(type_str)
gdb.error: No type named uint16.
My setup
gdb
Name : gdb
Version : 10.1-2
Description : The GNU Debugger
Architecture : x86_64
URL : https://www.gnu.org/software/gdb/
Licenses : GPL3
Groups : None
Provides : None
Depends On : glibc ncurses libncursesw.so=6-64 gcc-libs expat xz mpfr source-highlight gdb-common=10.1 readline libreadline.so=8-64 guile python libelf
Optional Deps : None
Required By : peda pwndbg-git
Optional For : rustup
Conflicts With : None
Replaces : None
Installed Size : 9.72 MiB
Packager : Anatol Pomozov <anatol.pomozov@gmail.com>
Build Date : Wed 04 Nov 2020 08:44:41 PM CET
Install Date : Sat 14 Nov 2020 11:15:29 PM CET
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
python
Name : python
Version : 3.8.6-1
Description : Next generation of the python high-level scripting language
Architecture : x86_64
URL : https://www.python.org/
Licenses : custom
Groups : None
Provides : python3
Depends On : bzip2 expat gdbm libffi libnsl libxcrypt openssl zlib
Optional Deps : python-setuptools [installed]
python-pip [installed]
sqlite [installed]
mpdecimal: for decimal
xz: for lzma [installed]
tk: for tkinter [installed]
Required By : ...
Optional For : ...
Conflicts With : None
Replaces : python3
Installed Size : 77.85 MiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Wed 30 Sep 2020 06:00:38 AM CEST
Install Date : Fri 09 Oct 2020 09:13:49 PM CEST
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
pwndbg
Name : pwndbg-git
Version : 2020.07.23.879.29f962c-1
Description : Makes debugging with GDB suck less
Architecture : any
URL : https://github.com/pwndbg/pwndbg
Licenses : MIT
Groups : None
Provides : pwndbg
Depends On : gdb python-capstone python-unicorn python-pycparser python-psutil python-ptrace python-pyelftools python-six python-future python-pygments
Optional Deps : checksec: checksec command support
ropper: ropper command support
ropgadget: ropgadget command support
radare2: radare2 command support
Required By : None
Optional For : None
Conflicts With : pwndbg
Replaces : None
Installed Size : 3.89 MiB
Packager : Unknown Packager
Build Date : Sat 14 Nov 2020 11:51:32 PM CET
Install Date : Mon 16 Nov 2020 11:00:32 PM CET
Install Reason : Explicitly installed
Install Script : No
Validated By : None
rustup 1.22.1 (2020-07-08) rustc 1.47.0 (18bf6b4f0 2020-10-07)
Small remark
I installed pwndbg using pacman
at first, but it was not able to get correct the correct python version, so I had to install all dependencies in pip myself (I used a bits of information from setup.sh
).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Data Types - The Rust Programming Language
Every value in Rust is of a certain data type, which tells Rust what kind of data is being ... The tuple without...
Read more >Unknown type name uint64_t and uint16_t uint8_t in Linux
I guess the code does not include cstdint or stdint.h , and/or it is not using the std::uint64_t syntax. So my answer can...
Read more >DataType in arrow2 - Rust
In a field with Map type, the field has a child Struct field, which then has two children: key type and the second...
Read more >Series in polars::series - Rust - Docs.rs
To quickly cast a Series to a ChunkedArray you can call the method with the name of the type: let s: Series =...
Read more >The ultimate guide to data types in Solidity - LogRocket Blog
Unsigned integers. An unsigned integer, declared with the uint keyword, is a value data type that must be non-negative; that is ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After posting my comment, I relalized the workaround everyone has been talking about.
If you make a simple rust project
cargo new gdbtest
build it
cd gdbtest && cargo build
open the debug executable with gdb
gdb target/debug/gdbtest
At your pwndbg prompt you must must manually enter the following
pwndbg> set language c
Then you can set your break point and run it, and it will work fine
pwndbg> b main.rs:1
pwndbg> r
Here is a screen shot for verification
Worked for me. @mattcoding4days Cheers mate!