Giter Site home page Giter Site logo

Comments (4)

akkartik avatar akkartik commented on May 24, 2024

It's quiet, I thought? What are you doing when it's noisy?

from mu.

tekknolagi avatar tekknolagi commented on May 24, 2024
willow% ./subx run ex2                 
1 entries in the program header, each 20 bytes long
program header at offset 34: type 1
blitting file offsets (54, 66) to addresses (8048054, 8048066)
willow% 

from mu.

akkartik avatar akkartik commented on May 24, 2024

Ah, got it. That's not the tracing, just prints using cerr. We can just comment them out, no problem. Wanna do a PR? Just scan for all cerrs in the repo.

from mu.

tekknolagi avatar tekknolagi commented on May 24, 2024
willow% ack cerr 0*.cc
000organization.cc
154:    cerr << "SubX requires a little-endian processor. Do you have Intel (or AMD or Atom) inside?\n";
160:using std::cerr;

001help.cc
8:  cerr << get(Help, "usage");
14:    cerr << "help on what?\n";
21:    cerr << get(Help, key);
25:    cerr << "No help found for '" << key << "'\n";
27:    cerr << "Please check your command for typos.\n";
34:  cerr << "Available top-level topics:\n";
35:  cerr << "  usage\n";
149://? cerr << INT_MAX+1 << '\n';  // test overflow
165:        cerr << "SIGABRT: might be an integer overflow if it wasn't an assert() failure\n";
171:        cerr << "SIGILL: most likely caused by integer overflow\n";
189://? cerr << "ε: " << smallest_subnormal_f << '\n';
190://? cerr << "ε/2: " << smallest_subnormal_f/2 << " (underflow)\n";  // test SIGFPE
252:using std::cerr;

002test.cc
26:    cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << '\n'; \
33:    cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << " == " << #Y << '\n'; \
34:    cerr << "  got " << (X) << '\n';  /* BEWARE: multiple eval */ \
55:  cerr << "C tests: " << ctime(&t);
57://?     cerr << "running " << Test_names[i] << '\n';
59:    if (Passed) cerr << '.';
62:  cerr << '\n';
65:    cerr << num_failures << " failure"
76:    cerr << "no test " << i << '\n';
98:    if (Passed) cerr << ".\n";

003trace.cc
134:      cerr << curr_label << ": " << curr_contents << '\n';
160:#define trace(...)  !Trace_stream ? cerr /*print nothing*/ : Trace_stream->stream(__VA_ARGS__)
164:#define DUMP(label)  if (Trace_stream) cerr << Trace_stream->readable_contents(label);
167:#define raise  (!Trace_stream ? (++Trace_errors,cerr) /*do print*/ : Trace_stream->stream(Error_depth, "error"))
222:    cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): unexpected errors\n"; \
230:    cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): trace_count of " << label << " should be " << count << '\n'; \
231:    cerr << "  got " << trace_count(label) << '\n';  /* multiple eval */ \
261:    cerr << "\nF - " << FUNCTION << "(" << FILE << ":" << LINE << "): line [" << label << ": " << contents << "] out of order in trace:\n";
265:    cerr << "\nF - " << FUNCTION << "(" << FILE << ":" << LINE << "): missing [" << contents << "] in trace:\n";

010vm.cc
35:cerr << "  registers\n";
150://?   cerr << "inst: 0x" << EIP << '\n';
160:      cerr << "unrecognized second opcode after 0f: " << HEXBYTE << NUM(op2) << '\n';
172:        cerr << "unrecognized third opcode after f3 0f: " << HEXBYTE << NUM(op3) << '\n';
178:      cerr << "unrecognized second opcode after f3: " << HEXBYTE << NUM(op2) << '\n';
184:    cerr << "unrecognized opcode: " << HEXBYTE << NUM(op) << '\n';
210:  cerr << "Opcodes currently supported by SubX:\n";
212:    cerr << "  " << HEXBYTE << NUM(p->first) << ": " << p->second << '\n';
214:    cerr << "  0f " << HEXBYTE << NUM(p->first) << ": " << p->second << '\n';
216:    cerr << "  f3 " << HEXBYTE << NUM(p->first) << ": " << p->second << '\n';
218:    cerr << "  f3 0f " << HEXBYTE << NUM(p->first) << ": " << p->second << '\n';
219:  cerr << "Run `subx help instructions` for details on words like 'r32' and 'disp8'.\n";
223:cerr << "  opcodes\n";

011parse.cc
36:cerr << "  syntax\n";

012direct_addressing.cc
43:    cerr << "unrecognized mod bits: " << NUM(mod) << '\n';

014immediate_addressing.cc
31:    cerr << "unrecognized sub-opcode after 81: " << NUM(subop) << '\n';

020elf.cc
10:  cerr << std::hex;

021translate.cc
29:    cerr << "could not open " << argv[2] << '\n';
33:  cerr << "DONE NOW FUCK THIS (parse)" << std::endl;
36:  cerr << "DONE NOW FUCK THIS (transform)" << std::endl;

022check_instruction.cc
51:cerr << "  instructions\n";
279://?     cerr << "comparing " << HEXBYTE << NUM(bitvector) << " with " << NUM(expected) << '\n';

from mu.

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.