3

Recently I get a test task from one company. And one question is:

Suppose you are given a task to write a simple debugger (for a proprietary operating system) that is capable of setting a break-point in an application and running it. What would be key design decisions you make in such a task?

I think I don't know something but I have absolutely no idea about answer. I understand how debuggers work (INT 3 - should have access to virtual space of debuggie) but I suppose the answer about "proprietary operating system".

Rafał Rawicki
  • 20,923
  • 3
  • 55
  • 76
LowCoder
  • 71
  • 2
  • You need to think more generally - `INT 3` is CPU-specific and the question doesn't say anything about what CPU this proprietary OS is running on. – Paul R May 05 '12 at 10:06
  • Hmmm trying to think of a non-proprietary operating system. Not sure what they are getting at either, as an operating system is a suite of applications, some of which you might use in a debugger, but hopefully at a fairly high level of abstraction. Sounds like a HR translation of a very technical question this. – Tony Hopkinson May 05 '12 at 10:10
  • @TonyHopkinson I think "proprietary" means that, you cannot modify any part of the operating system. – Rafał Rawicki May 05 '12 at 10:16
  • @Rafal. Maybe they should have used a different word then, because that isn't what proprietary means and an OS you can't modify any part of is a waste of bits. – Tony Hopkinson May 05 '12 at 19:23
  • @TonyHopkinson I know what proprietary means, I just assumed that this is an imprecise abbreviation of "you do not have a source code and cannot extend the OS for your purposes" and this is a reasonable constraint when you propose such a test task. – Rafał Rawicki May 05 '12 at 20:51
  • It's a reasonable constraint for an academic exercise, I doubt the role was for that. It's questions like this that prove to me my potential employer isn't one.... – Tony Hopkinson May 06 '12 at 11:21

1 Answers1

1

This question, as usual at the interview should make you asking more questions about the system and requirements.

Does operating system already provide some kind of primitive tracing tool you can use? What language are tested applications written in?

Some inspection tools, for example valgrind, run inspected programs in their own environment, which seems a good way to go in your case. The other approach is to instrument the binary with tracing instructions, communicating with your debugger - this is probably more suitable and easier to do when your applications run under a VM.

Community
  • 1
  • 1
Rafał Rawicki
  • 20,923
  • 3
  • 55
  • 76