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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:40:00+00:00 2026-05-11T05:40:00+00:00

Question cribbed from here : I have a program that takes input from stdin

  • 0

Question cribbed from here:

I have a program that takes input from stdin and also takes some parameters from command line. It looks like this:

cat input.txt > myprogram -path "/home/user/work" 

I try to debug the code with gdb inside emacs, by M-x gdb, I try to load the program with the command:

gdb cat input.txt > myprogram -path "/home/user/work" 

However, gdb does not like it.

Unfortunately I don’t understand the solution and am not sure what to do beyond compiling with the -g option and running the command M-x gdb.

  • 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. 2026-05-11T05:40:01+00:00Added an answer on May 11, 2026 at 5:40 am

    If you were doing it from a shell you’d do it like this:

    % gdb myprogram gdb> run params ... < input.txt 

    This seems to work within emacs too.

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

Sidebar

Related Questions

Question context: let say that there is some really important row in config/locales/en.yml that
Question in title pretty much sums it up. I have some resource object defined
Question is quite simple. Let's say I have an URL config with line: url(r'^models/(?P<model_group_id>[0-9]+)/(?P<page>\d+)/$',
Question Is it possible to create a second Preference Dialog that can take some
Question: input an int number ex: ABCD, verify that is ABCD = AB*CD or
Question Is there a way to have a method that will always run anytime
Question Is it possible to stop a Message Driven Bean (programmatically), so that it
Question from Object-Oriented JavaScript book: Imagine Array() doesn't exist and the array literal notation
Question is already been asked in title. Here is a code: (function($){ var filter
Question Implement a function bool chainable(vector<string> v) , which takes a set of strings

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.