Giter Site home page Giter Site logo

Comments (6)

zachriggle avatar zachriggle commented on May 3, 2024

It solves the issue where the current $PC is known to be in a file, but does not correspond to any line in the file -- so GDB sets it to the top of the file.

from pwndbg.

anthraxx avatar anthraxx commented on May 3, 2024

@zachriggle I see, not sure how this could be solved without breaking the above mentioned scenario. Does that happen that often?

from pwndbg.

zachriggle avatar zachriggle commented on May 3, 2024

I'm not sure, since it hides it when it happens ^_^.

I wouldn't have gone out of my way to add the check if it wasn't affecting me in some way.

What files are you debugging where the first line of source in a file is important (i.e. not a function declaration)?

from pwndbg.

anthraxx avatar anthraxx commented on May 3, 2024

its nut just about the very first line. the check looks if the first line of the source listing is the first line of the file. that also applies if you break on the first function in a file not having many includes so that the first line of the file is actually included in the listing.
It happens quite often in some of my projects, I noticed it because i tried to break on one of them to debug and did see nothing 😅

from pwndbg.

zachriggle avatar zachriggle commented on May 3, 2024

It seems the best way to fix this is to check the current line, rather than whether or not the first line appears in the listing.

Would you agree that if the current line is claimed to be Line 1, something is wrong?

This way you can get listings which happen to include Line 1.

from pwndbg.

anthraxx avatar anthraxx commented on May 3, 2024

@zachriggle yes, i guess that sounds safe to assume and should not happen under normal conditions

PS: should i make a PR?

from pwndbg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.