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 7659531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:20:42+00:00 2026-05-31T13:20:42+00:00

I already posted the following Question got a solution and moving forward I am

  • 0

I already posted the following Question got a solution and moving forward

I am using ptrace to find what all are the arguments that are passed to the system call.
The program is fetching me values in ebx, ecx, edx. Now for a open system call I got the foll

SYSCALL 5: ebx :bf9748af ecx: 00008000 edx: 00000000 /open
SYSCALL 5: ebx :80485b3 ecx: 00000242 edx: 000001b6 /open

I used strace and it magically converts the above like this:

open(“test.txt”, O_RDONLY|O_LARGEFILE) = 3
open(“test.txt”, O_RDWR|O_CREAT|O_TRUNC, 0666) = 3

How can I do this manually? Is there any place I can find out the values for O_LARGEFILE?
I searched a lot and came across this But it doesnt have everything. Also tried reading strace code but did not come across the code for this conversion.

If someone can help me out it would be very helpful for me. Also If you know where this is written in strace I want to take a peek at it. Thanks in advance.

  • 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-05-31T13:20:43+00:00Added an answer on May 31, 2026 at 1:20 pm

    You can read out those values from this header file:

    #define O_ACCMODE      0003
    #define O_RDONLY         00
    #define O_WRONLY         01
    #define O_RDWR           02
    #define O_CREAT        0100 /* not fcntl */
    #define O_EXCL         0200 /* not fcntl */
    #define O_NOCTTY       0400 /* not fcntl */
    #define O_TRUNC       01000 /* not fcntl */
    #define O_APPEND      02000
    #define O_NONBLOCK    04000
    #define O_NDELAY    O_NONBLOCK
    #define O_SYNC       010000
    #define O_FSYNC      O_SYNC
    #define O_ASYNC      020000
    

    But the portable way of doing it is by using the macros for those values.

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

Sidebar

Related Questions

Following is a question that is posted on http://dev.eclipse.org in April 2003. The original
I already posted a question regarding it, but at that time I haven't have
I have already posted a question about this, but the situation has changed sufficiently
Sorry if the question has already posted, I want to know if GAE support
I know this question was already posted in StackOverflow but I either didnt understand
I ask this question as a followup of this question . A solution that
[I already posted something very similar but the question wasn't good, here is what
This is an already posted question but I need to understand what is going
This question is related to another question that I posted on SO earlier How
i have already posted my issue in SO and got an answer but i

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.