• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Issue in LLDB's Expression Parser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue in LLDB's Expression Parser


  • Subject: Issue in LLDB's Expression Parser
  • From: Andreas Grosam <email@hidden>
  • Date: Wed, 27 Jul 2011 13:16:23 +0200

Hi All,


I figured an issue in the _expression_ parser of LLDB.

Firstly, I'm not sure if LLDB uses its own parser or if it's based somehow on LLVM. Anyway, here is the problem:

LLDB prints the following result for the given _expression_:
(lldb) print ((uint8_t)(0) - 0xC2) < 0x32
(_Bool) $2 = true


If my understandings of the C99 integer promotion, value preserving and sign preserving rules are correct, the result should be false however.
The rationale and the rules for the above _expression_ do appear complex, however LLVM and GCC both agree on me ;)


Here is code that corresponds to the _expression_ above:

uint8_t c = 0;
bool result =  (c - 0xC2) < 0x32;

LLVM and GCC will evaluate this to false.



Regards
Andreas
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Issue in LLDB's Expression Parser
      • From: Jim Ingham <email@hidden>
  • Prev by Date: Re: Xcode's Windows Still Open After Force Quit
  • Next by Date: Re: Xcode's Windows Still Open After Force Quit
  • Previous by thread: Re: Xcode's Windows Still Open After Force Quit
  • Next by thread: Re: Issue in LLDB's Expression Parser
  • Index(es):
    • Date
    • Thread