Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8898431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:36:56+00:00 2026-06-15T00:36:56+00:00

I use GDB and want to modify an iOS app. (for example: change score

  • 0

I use GDB and want to modify an iOS app. (for example: change score in a game)

So, I set breakpoint, for example:

b *0x0032c870

and that in the breakpoint, I enter

info r

after this, gdb shows

r0             0x92717c0    153556928
r1             0x7d47a0 8210336
r2             0x0  0

And now I know what I need is change r2 to 1

set $r2=1

Now the value changes in the game.

OK, there’s a question, how can I edit in hexeditor to set r2=1 instead using gdb everytime?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:36:57+00:00Added an answer on June 15, 2026 at 12:36 am

    how can I edit in hexeditor to set r2=1 instead using gdb everytime

    You can’t: the value of r2 is the value of the register; it doesn’t exist until the program is running.

    What you need to do is figure out where that value was loaded into the register, and change the code there to make it load 1 instead of 0.

    This could be very easy, or tricky depending on how that value is loaded: easy if it’s loaded as a constant (just change the instruction to load a different constant). But chances are it’s loaded as a return value from some function, in which case you’ll have to change that function to return a different value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use GDB to step though the C++ code that makes
I attached to a program with gdb in OSX and I want to use
I want to use gdb to debug the code. When I write the command:
Below is an example of source I want to use on a machine running
Is there a command in gdb that I can use to (re)load / refresh
What should I do if I want to use identifier NULL in gdb 's
I use gdb to debug my cpp code. I set breakpoints in this way:
I want to use gdb for looking into the various details of the fork()
People use gdb on and off for debugging, of course there are lots of
I'm trying to use GDB (v 7.3.1) from macports to debug an executable compiled

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.