Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gdb accepts no breakpoint
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 544
Location: Germany

PostPosted: Tue Nov 19, 2024 3:40 pm    Post subject: gdb accepts no breakpoint Reply with quote

Hello, it may appear "old problem", but the solutions offered in 2004 didn't work for me :)

When I run a program in gdb and set a breakpoint (on main or anywhere else), then after "run" I get following "Warning":

Quote:

Cannot insert breakpoint 1.
Cannot access memory at address 0x5555555553a2


This is my own program which is compiled with "-g" and even "-ggdb". I don't have hardened Kernel, at least I haven't configured it explicitly. I use latest GDB (15.2-r100).

If breakpoint is not set, then command "run" executes program without any error to the end. Which is kind of useless without breakpoints :)

This might be related to kernel. At least in WSL (which uses version 5.15.167) gdb works without problem. But I have no idea, what was added to 6.6.58, that I currently use. The rest of system is the same as in WSL.

So, maybe someone can offer more insights?
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1977

PostPosted: Sat Nov 23, 2024 2:08 am    Post subject: Reply with quote

A user joined #gdb on IRC with a similar sounding issue. Their problem was CONFIG_PROC_MEM_FORCE_PTRACE was off (i.e. CONFIG_PROC_MEM_NO_FORCE was on).
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5132
Location: Bavaria

PostPosted: Sat Nov 23, 2024 9:21 am    Post subject: Reply with quote

sam_ wrote:
A user joined #gdb on IRC with a similar sounding issue. Their problem was CONFIG_PROC_MEM_FORCE_PTRACE was off (i.e. CONFIG_PROC_MEM_NO_FORCE was on).

Yes, this option was introduced with kernel 6.11.3. See also number 8 of:
https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Kernel_Upgrade_from_6.10_to_6.11#Upgrade
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum