0xCC

February 16, 2008

디버깅을 하다가 메모리가 software interuppt를 뜻하는 0xCC나 0xCD로 차있는 것을 보는 일은 흔하다. 며칠 전 문득 저게 왜 0xCC일까 궁금해졌다. 0xAA 도 0xBB도 아니고 0xCC인 데에는 뭔가 사연이 있을 것 같았다. 2진수로 봐도 11001100 이니 어쩐지 Debug breakpoint exception 과 관련된 그럴싸한 이유가 있어 보이는 숫자가 아닌가. 그래서 i386 opcode table을 찾아봤다.

Code Search: i386.h from Gdb at Krugle

이걸 봐서는 아무 이유 없는 것 같다. 그냥 순서대로 정하다보니 0xCC의 차례가 온 게 아니었을까 싶다. 혹시 내가 모르는 사연이 더 있는걸까.

Entry Filed under: Uncategorized. Tags: .

4 Comments Add your own

  • 1. 라슈펠  |  February 19, 2008 at 4:35 pm

    뭐가 궁금한건지 잘 모르겠음… ; 원래 빈 영역인데 0xcc로 차 있다는게 이상하다는건지 아니면 빈 영역을 0xcc로 채우는 이유가 궁금한건지 그것도 아니면 software interrupt의 opcode가 0xcc인 이유가 궁금하다는건지… ;

    Reply
  • 2. 지양  |  February 24, 2008 at 2:34 pm

    opcode가 0xcc인 이유가 궁금한 거였지.

    Reply
  • 3. 냥날  |  February 27, 2008 at 2:57 pm

    음 뭐야 왜 리플 안남어.
    참고 링크. darkkaiser.cafe24.com/blog/185

    Reply
  • 4. 지양  |  February 27, 2008 at 3:35 pm

    다들 워드프레스에 뭘 잘못했길래 스팸으로 분류되고 있는지-_-?
    냥날/ 초기화할 때 0xCC로 채워지는 것도 알겠고, 0xCC가 Debug break를 만드는 opcode 인 것도 알겠는데, 제가 궁금했던 건 왜 하필 0xCC냐 이거였죠.

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Tags

addon android Assembly batch book C++ editor excel google InstallShield lua personal physic security wow

Recent Posts

Recent Comments

지양 on Source Insight – Browse …
조프 on Source Insight – Browse …
조프 on Source Insight – Browse …
랑탕 on Google 크롬의 Crash message
지양 on n&(n-1)

Blogroll