[질문] HP-UNIX에서 Debug 정보를 안넣는 방법.

bizzare의 이미지

HP-UNIX에서 빌드할 때 (aCC)
디버그 옵션은 -g로 알고 있습니다.

그래서 릴리스모드로 빌드한다고 생각하고서
-g 옵션없이 빌드를 했는데,
ASSERTION이 발생하는 것 같더군요.
ex) assert(0);

그래서 optimize옵션인 -O+O2 를 줘 봤는데도

여전히 ASSERTION은 발생하더군요.

이게 단순히 ASSERTION이 발생하는 것 뿐인지,
디버그정보가 포함된채로 빌드된 것인지 정확히 모르겠더군요.

저의 질문은

1) 빌드 시에 Debug정보가 포함되지 않도록 하는 법

2) 생성된 binary가 Debug정보를 포함하고 있는지 확인하는 법

3) 어쩌면 debug정보는 안들어갔는데, assert코드만 작동하는 것일 수도 있다는 생각이 들더군요. NDEBUG가 정의되어 있지 않으면 동작하는 매크로니까요. 그런걸까요? 그렇다면 NDEBUG를 제가 명시적으로 define 해줘야 하나요?

입니다.

답변 부탁드립니다.

revizes의 이미지

Quote:
1) 빌드 시에 Debug정보가 포함되지 않도록 하는 법

-g 옵션이 없으면 기본적으로 debug symbol이 들어가지 않습니다. HP-Unix는 모르겠고
리눅스에는 strip이라는 커맨드가 있습니다. man page를 읽어보시면
-g 옵션을 주고 컴파일 했더라도 debug symbol들을 제거시켜준다는 것을 아실 수 있을 것입니다.

Quote:
2) 생성된 binary가 Debug정보를 포함하고 있는지 확인하는 법

디버거를 돌려보면 알 수 있을텐데요..^^

Quote:
3) 어쩌면 debug정보는 안들어갔는데, assert코드만 작동하는 것일 수도 있다는 생각이 들더군요. NDEBUG가 정의되어 있지 않으면 동작하는 매크로니까요. 그런걸까요? 그렇다면 NDEBUG를 제가 명시적으로 define 해줘야 하나요?

질문의 정확한 의미를 모르겠네요..^^

다 덤벼! 다 받아줄께!!

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.