21 Commits

Author SHA1 Message Date
Mike McQuaid
56e82c941e mach: improve otool failure handling. 2014-12-11 13:59:12 +00:00
Mike McQuaid
02e5f8ed6b mach: handle empty otool output. 2014-12-11 13:23:44 +00:00
Jack Nagel
85a9156c6f Revert "Don't raise in mach_data so the debugger doesn't catch it"
This reverts commit 4f8a3e2113c2e7b88600ff6371f9f70579c55509.
2014-10-11 01:45:41 -05:00
Jack Nagel
977a2ceae3 Revert "Handle read(n) returning nil"
This reverts commit 578cb637594d32b86322be29205329d700ad75ca.
2014-10-11 01:45:36 -05:00
Jack Nagel
a6df8785d8 Handle read(n) returning nil
Fixes Homebrew/homebrew#33090.
2014-10-10 20:25:38 -05:00
Jack Nagel
01397d17f7 Don't raise in mach_data so the debugger doesn't catch it
Closes Homebrew/homebrew#33088.
2014-10-10 19:22:11 -05:00
Jack Nagel
dfddb2a761 Allow access to both the linked dylibs and the dylib ID 2014-04-13 14:57:11 -05:00
Jack Nagel
f4e23b2227 Remove unnecessary captures in otool regexp 2013-12-14 09:35:58 -06:00
Jack Nagel
ce19fa2223 Unify install name parsing 2013-12-14 09:35:58 -06:00
Jack Nagel
68f6936070 Move Pathname#dynamically_linked_libraries to mach module 2013-12-14 09:35:58 -06:00
Adam Vandenberg
3703d60e57 Fix const reference in mach
Fixes Homebrew/homebrew#22090.
2013-08-24 16:42:29 -07:00
Misty De Meo
b0d45b29bd Mach: add as_cmake_arch_flags helper 2013-08-15 22:46:56 -07:00
Misty De Meo
ab633864d5 Mach: improve PPC arch detection
Also adds some reusable constants into the global Hardware::CPU
namespace, available on both OS X and Linux.
2013-08-15 22:46:56 -07:00
Jack Nagel
6197eae3d4 mach.rb: remove incorrect comment
IO#read does not raise EOFError, it just returns an empty string for
each call after it consumes the underlying file or stream.

This module is going to be refactored and the begin/rescue is going to
be removed anyway.
2013-03-11 17:41:21 -05:00
Shaun Jackman
258d70028f Portability fixes to run Homebrew on Linux systems
Closes Homebrew/homebrew#16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00
Adam Vandenberg
bad80d58f9 Architecture: add flag for ppc support 2013-02-03 21:07:59 -08:00
Jack Nagel
e2058ed362 mach-o: use any? instead of map and include?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-21 13:45:35 -05:00
Jack Nagel
2cca8e1a4f Teach Mach-O machinery about bundles
c.f. Homebrew/homebrew#12810.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-16 11:43:43 -05:00
Jack Nagel
075a59e3f1 Fix indentation in MachO#mach_data
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-16 11:11:09 -05:00
Jack Nagel
53ce9dba53 archs_for_command: use new Mach-O Pathname methods
- Reimplement archs_for_command on top of the new Mach-O methods
 - Move ArchitectureListExtension to mach.rb
 - Add a test for the ArchitectureListExtension

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:48 -05:00
Jack Nagel
a786178382 Pathname: add Mach-O module
The MachO module contains methods for learning about Mach-O binaries,
and can be used where one might normally shell out to file(1).

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:48 -05:00