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

  • Home
  • SEARCH
  • 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 8903431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:52:09+00:00 2026-06-15T01:52:09+00:00

I am manipulating a .class file. I am using the InstrutionHandle package to get

  • 0

I am manipulating a .class file. I am using the InstrutionHandle package to get the instructions one at a time. I have the byte offset of the instruction via getPosition() method
, can i get the source line number from the byte offset?

  • 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-15T01:52:10+00:00Added an answer on June 15, 2026 at 1:52 am

    That depends on whether the classfile is compiled with debugging information. Usually, the compiler will insert a LineNumberTable attribute which gives the original source line numbers corresponding to each range of bytecode. However, the LineNumberTable attribute is just metadata, so the author could put anything they want in there with minor constraints or just omit it entirely. (Typically done by compiling with -g: none or by running an obfuscator on it)

    Anyway, the format of the attribute is number of entires (2 bytes) followed by (start pc, line number) pairs (both 2 bytes). You can also have multiple LineNumberTable attributes. Of course if you’re using a library, it will probably decode these for you already.

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

Sidebar

Related Questions

I have a small script we're using to read in a CSV file containing
I'm using the Apache POI library for manipulating a PowerPoint file. It works great
I am using Uploadify and class.upload.php for uploading and manipulating images. here are my
I have a class manipulating only shared_ptr to an inheritance hierarchy (quite simple, there
Is it possible, given a java.lang.Class object, to get the source file name and
I have a static util class that does some string manipulation on a bit
When manipulating Handler Mappings using the Microsoft.Web.Administration namespace, is there a way to remove
I tried manipulating fb_button_text value using jQuery but, it didn't work at all. Then
I'm manipulating few data with PHP, I have the choice between Json and XML.
which one should be used to manipulating data, Array or Array Object? Like search,sort

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.