Commit Graph

46191 Commits

Author SHA1 Message Date
Rene Gollent
104b28862d Debugger: DwarfFile: Fix DWARF4 signature handling.
Depending on how the type unit was actually set up hierarchically,
we sometimes ended up with the unit set to the wrong actual type
object. Instead, we now simply let the unit parse, and then look up
the entry by the offset specified in the header after all is said
and done. Fixes class/struct objects sometimes winding up resolving
to one of their members instead.

Some problems still remain with resolving variable values for such
types though, needs further investigation.
2013-07-19 21:44:48 -04:00
Rene Gollent
1c292f7eb4 ProcessController: Fix memory calculations.
On systems with > 4GB of memory, the calculations would overflow,
leading to the memory bars being drawn incorrectly.
2013-07-19 20:53:12 -04:00
Humdinger
8f79f5f3b8 Rebuild Paladin package.
Paladin relied on liblocale.so that was moved to libbe (I think).
An updated patch will be submitted to haikuporter shortly.
2013-07-19 22:06:33 +02:00
Philippe Saint-Pierre
0e95ac1797 CPUFreq: rewrite interpolation formula - division by zero (#9872) 2013-07-18 22:27:27 -04:00
Rene Gollent
2fab6ab728 Debugger: Fix handling of contained type attribute.
The DIEs generated by gcc sometimes pass a modified type for
DIEPointerToMember's containing type. As such, we need to resolve
the passed in type down to its base type before verifying that it's
indeed a compound type.
2013-07-18 21:37:02 -04:00
Rene Gollent
fe07d32c75 Debugger: Reorder unit finishing.
Type units need to be finished before compilation units to ensure that e.g.
modified types have their base types already set by the time we get to
compilation unit attributes.
2013-07-18 21:37:01 -04:00
Philippe Saint-Pierre
d087b9ca15 CPUFreq: use transparent background when used as replicant 2013-07-18 20:54:50 -04:00
Rene Gollent
a5bee83638 DwarfFile: Slight cosmetic change to trace output.
Output the DIE trace for a type unit after we've read the signature and
type offset so we can include those as well.
2013-07-18 19:07:59 -04:00
Jérôme Duval
f3b8787e91 virtio.h: remove trailing whitespaces. 2013-07-18 18:27:01 +02:00
Jérôme Duval
9e88776c80 virtio_block: takes capacity change into account
* allows live resizing.
2013-07-18 18:25:59 +02:00
Jérôme Duval
2f2f475b1d virtio*: remove trailing spaces 2013-07-18 17:57:56 +02:00
John Scipione
f1eb42958f BMenuField: Check if Frame() is valid, refactor 2013-07-18 03:24:26 -04:00
John Scipione
8d75f14355 BMenuField: Style fixes 2013-07-18 03:24:26 -04:00
Alexander von Gluck IV
ae4da1002b netserver: Add EAP defines for WPA enterprise
* Working towards #8850
2013-07-17 20:16:49 -05:00
Rene Gollent
e042b11803 Debugger: implement support for section-global references.
- Add DwarfFile::_GetContainingCompilationUnit() to request a binary
search for the compilation unit containing the passed in global offset.
- DwarfFile::_ResolveReference(): handle global references by first
attempting to find a containing compilation unit, and then seeing if we
can find an entry for the corresponding relative offset within it.
2013-07-17 18:20:15 -04:00
Rene Gollent
9cd4e805e6 Debugger: Add convenience function to BaseUnit...
...to query if a given global offset is within its range.
2013-07-17 18:20:13 -04:00
Rene Gollent
142f7cabdc Debugger: DwarfFile: Clean up type units on delete. 2013-07-17 17:54:39 -04:00
Rene Gollent
6882d4b5d7 Debugger: Handle DW_FORM_exprloc.
Get rid of AC_EXPRESSION. DW_FORM_exprloc is for all practical intents
and purposes identical to DW_FORM_block except with a more explicit
intent. As such, simply treat it the same as a block attribute. Gets
value resolution working on DWARF4.
2013-07-17 17:12:37 -04:00
Philippe Saint-Pierre
f74ad62fd4 ICNS translator: use delete [] where new [] was used 2013-07-17 17:08:28 -04:00
Philippe Saint-Pierre
a71f2ed86a TrackerReader: style fixes, no functional changes intended 2013-07-17 16:58:41 -04:00
Philippe Saint-Pierre
cd15d8c3d0 Style fix, no functional change intended 2013-07-17 13:38:46 -04:00
Philippe Saint-Pierre
68aca9a477 Message screensaver: memory leak fix - CID 601698 2013-07-17 13:25:42 -04:00
Philippe Saint-Pierre
fa30ef5640 Message screensaver: close pipe with pclose - CID 990944 2013-07-17 13:06:10 -04:00
Philippe Saint-Pierre
f293052d9f Style fix, no functional change intended 2013-07-17 12:44:40 -04:00
Murai Takashi
fa49409097 Use delete[] instead of delete
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-07-17 18:31:28 +02:00
Murai Takashi
15be2c6018 Fix called C++ object pointer is null
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-07-17 18:29:29 +02:00
Murai Takashi
2aa0e54e4f Fix called C++ object pointer is null
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-07-17 18:26:10 +02:00
Murai Takashi
7a569c8250 Fix Called C++ object pointer is null
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-07-17 18:26:08 +02:00
Philippe Saint-Pierre
be064b5af3 virtio_pci.cpp: check for (un)supported hardware never fit
CID #1032255
2013-07-17 12:15:24 -04:00
Philippe Saint-Pierre
da1f251a8f DiskUsage: drawing artefact in TabView 2013-07-17 12:01:26 -04:00
Jérôme Duval
e598dee752 virtio_scsi: now handles events like capacity data changed.
* push event requests on the event queue, handles them.
* activate feature VIRTIO_SCSI_F_CHANGE.
* when a capacity data changed event is received, schedule a rescan of the scsi device node
on the scsi dpc queue. we find out unique child node and call the rescan_node() hook.
* Haiku only handles media changed events on removable devices, so the feature
only actually works when the device is defined as such, aka for QEMU the following option:
-device scsi-hd,drive=hd,removable=true
2013-07-17 17:48:33 +02:00
Jérôme Duval
ed4a8e4d11 virtio: changed a bit the driver API by adding a driverCookie.
* the processing of requests in drivers is eased a bit with this change, but
this could be improved for instance by enabling a driver to dequeue items
in a service thread instead of the interrupt handler.
* made a few methods const.
2013-07-17 17:30:18 +02:00
Jérôme Duval
b3a0911eb7 virtio_scsi: added configuration change definitions.
* supported by at least QEmu 1.4
2013-07-17 17:19:47 +02:00
Jérôme Duval
ea2fa87219 scsi_cmds.h: added SCSIS_ASC_CAPACITY_DATA_HAS_CHANGED
* indicates the device data capacity has changed..
2013-07-17 17:19:46 +02:00
Jérôme Duval
f08e2e6b2a scsi: propagates the rescan to our child device
... when registering finds an existing device with a registered child node.
2013-07-17 17:19:46 +02:00
Jérôme Duval
a6ffcfb320 scsi_disk: added a hook for rescanning devices
* a call indicates the media was changed.
2013-07-17 17:19:45 +02:00
Rene Gollent
71fec49e67 DwarfFile: Implement handling of .debug_types section.
- Refactor ExpressionEvaluationContext::GetCallTarget() and
DwarfFile::_ResolveReference() to use an enum value for the type of
reference being passed in, as we now need to support signature
references in addition to local/global. Adjust callers.
- Factor out an _ParseDebugInfoSection() and add a corresponding
_ParseTypesSection() for the top level loops that handle .debug_info and
.debug_types respectively.
- Refactor _ParseDebugInfoEntry(), _ParseEntryAttributes() and
_ResolveReference to take a pointer to the relevant BaseUnit in order
to allow sharing between parsing of the types and info sections.
- Implement support for DW_FORM_ref_sig8. In order to handle this, we
use a hash table that maps from the corresponding 64-bit DW_AT_signature
values to their respective type units.
- Adjust debug output to more closely match offsets and values used by
objdump for ease of troubleshooting parsing issues.

Combined, these changes allow us to load DWARF 4 binaries sufficiently
to get source information and unwind call frame, though support is still
incomplete. In particular, global references aren't yet implemented,
and neither are location expression attributes, which are now used
quite heavily, and consequently we can't yet resolve variable values
and a few other things properly.
2013-07-16 23:29:22 -04:00
Rene Gollent
4bf8368675 Add TypeUnit and refactor.
- Pull common base class BaseUnit out of CompilationUnit and adjust the
latter to inherit.
- Add TypeUnit to represent the top level units for .debug_types.
2013-07-16 23:29:18 -04:00
Rene Gollent
18c9c018a1 Add DIETypeUnit.
Represents a top level unit from DWARF 4's .debug_types section, akin
to a compilation unit.
2013-07-16 23:00:23 -04:00
Rene Gollent
cbf9b7b177 Update attribute classes to match DWARF 4. 2013-07-16 23:00:22 -04:00
Rene Gollent
db935bfbe9 Implement support for DW_FORM_sec_offset.
This form denotes references to other debug sections, and is sized based
on whether the 32 or 64-bit DWARF format is used.
2013-07-16 23:00:21 -04:00
Rene Gollent
a074f3547a Fix incorrect handling of DW_FORM_flag_present.
This form implicitly indicates a flag value of true without a
corresponding byte in the datastream. As such, we were introducing off
by one errors when parsing one.
2013-07-16 23:00:20 -04:00
Rene Gollent
d3a795bcb4 Debugger: Extend FunctionDebugInfo interface.
- Add hook to FunctionDebugInfo to determine if the represented function
is the main function of the program. Adjust
{Basic,Dwarf}FunctionDebugInfo accordingly.

- {Team,Image}DebugInfo: When loading, see if the current image contains
the main function. If so, cache it for later retrieval.
2013-07-16 23:00:20 -04:00
Ingo Weinhold
e89d7992e5 virtio_block_callback(): prevent rescheduling
... since it can be called with interrupts disabled.
2013-07-16 23:50:19 +02:00
Alexander von Gluck IV
42eed3ba69 RadeonHD: Fix incorrect name -> chipset mapping
* Put names and chipsets next to each other to
  help prevent further mismatch.
* Fix potential (but unlikely) string overflow
* CID 611140
2013-07-16 11:20:24 -05:00
Alexander von Gluck IV
1207554139 RadeonHD: Missing curly braces for temporal logic
* Great catch stpere!
* CID 991343
2013-07-16 11:02:15 -05:00
John Scipione
f47bef09a2 Deskbar: Check if window is NULL. Fixes #9860
It is possible, through the right combination of steps, for this method to
be run on startup before the view is attached to the window causing a crash
because Window() returns NULL. This fix returns false in this case instead.
Later, when an application such as Tracker is started and added to Deskbar
this method will be run again with the view attached to the window.
2013-07-15 19:33:17 -04:00
Murai Takashi
ddc2a758e6 Chunk::Chunk(), Fix Null pointer argument in call to memory copy function
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-07-15 17:25:13 +02:00
Murai Takashi
517050adb5 BCollator::Archive(), use free() instead of delete
Signed-off-by: Oliver Tappe <zooey@hirschkaefer.de>
2013-07-15 13:13:22 +02:00
Murai Takashi
10dbe57ef3 PackageItem::ParseAttribute(), use delete[] for deleing *attrData.
Signed-off-by: Oliver Tappe <zooey@hirschkaefer.de>
2013-07-15 13:09:26 +02:00