Commit Graph

41571 Commits

Author SHA1 Message Date
Oliver Tappe
8057318361 Added tests, exposing problems in wcsrtombs() and mbsrtowcs(). 2011-12-12 17:27:43 +01:00
Oliver Tappe
0ad71bca30 Simplify wcrtomb() wrapper.
* since the backend now supports it, we can safely pass NULL as s
  to the backend
2011-12-12 17:27:43 +01:00
Oliver Tappe
47e0423a09 Drop public symbols for mbsnrtowcs() and wcsnrtombs().
We only implement POSIX_VERSION 199009, so these needn't be exported.
2011-12-12 17:27:43 +01:00
Oliver Tappe
0cf89c88d3 Activate our own wcs*tombs()-functions.
* add our own version of these functions to the build
* drop the glibc implementations of those functions
2011-12-12 17:27:42 +01:00
Oliver Tappe
995d6d827f Implement our own version of wcsrtombs().
* add WcharStringToMultibyte() to libroot's locale backend
* implement wcstombs(), wcsrtombs() and wcsnrtombs() on top of that
  new backend function
2011-12-12 17:27:42 +01:00
Oliver Tappe
5dd04ce5da Add tests for missing mbs/wcs-functions.
* add gnulib test for wcsrtombs()
* add gnulib tests for mbsnrtowcs() and wcsnrtombs(), both inactive
  as the respective functions are not publically available (they are
  part of the [CX] extended ISO-C standard which we do not yet support)
2011-12-12 17:27:42 +01:00
Oliver Tappe
b8b6531011 Add implementation for mbstowcs().
* implement mbstowcs() on top of mbsrtowcs()
* drop glibc's version of mbstowcs()
2011-12-12 17:27:42 +01:00
Oliver Tappe
758e5e7dcd Drop a couple of mbsrtowcs() tests that can't work on Haiku.
* Our mbstate_t just references a corresponding ICU converter, but
  does not actually contain its state. So a mere copying of the mbstate
  won't duplicate the converter's intrinsic state, which means that
  restarting with the copied state won't work.
  If have experimented with cloning the converter into the mbstate_t,
  but I was unable to get that to work, either. Apparently, the state
  of the converter isn't cloned (but just the converter's settings
  and data).
2011-12-12 17:27:41 +01:00
Oliver Tappe
73186b2fcd Add implementation of mbsrtowcs() to our locale backend.
* add MultibyteStringToWchar() to ICU locale backend
* implement mbsrtowcs() and mbsnrtowcs() on top of 
  MultibyteStringToWchar()
* drop respective glibc files
2011-12-12 17:27:41 +01:00
Oliver Tappe
d0e7bc307c Reset ICU-converter in case of error. 2011-12-12 17:27:41 +01:00
Oliver Tappe
cfe553b378 Squash TODO: __STDC_ISO_10646__ is being defined now. 2011-12-12 17:27:41 +01:00
Oliver Tappe
cf13327bef Whitespace cleanup. 2011-12-12 17:27:40 +01:00
Oliver Tappe
0983c476d9 Add gnulib-test-mbsrtowcs.c in order to test mbsrtowcs()
* the test exposes problems in our current (glibc's) implementation
  of mbsrtowcs()
2011-12-12 17:27:40 +01:00
Michael Lotz
eb5e1c09e3 Fix the build, sorry for the noise. 2011-12-12 15:20:48 +01:00
Rene Gollent
f67acc2c72 Use architecture to determine correct frame pointer comparison. 2011-12-12 08:41:45 -05:00
Rene Gollent
4b64cd3de3 Add architecture function for retrieving the stack growth direction.
Also add corresponding implementation for x86.
2011-12-12 08:40:49 -05:00
Rene Gollent
673c1e4d07 Fix step out for recursive functions.
When asked to step out, we now store the frame pointer of the current
stack frame. Upon hitting our temporary breakpoint, we then verify that
the current frame pointer is in fact in the previous frame. If not, we
reinstate the breakpoint and continue running.
2011-12-11 22:32:42 -05:00
Rene Gollent
12b1aa817a Expose the stack pointer and frame pointer via CPUState. 2011-12-11 22:32:40 -05:00
Michael Lotz
7bdc07318d Fix use after free in error case. CID 10545. 2011-12-12 03:37:58 +01:00
Michael Lotz
85819ae108 Remove extra free() that lead to a double free. CID 10546. 2011-12-12 03:34:56 +01:00
Michael Lotz
c11c724e25 Remove needless atomic_add() accessing freed memory. CID 10551. 2011-12-12 03:15:39 +01:00
Rene Gollent
ebc0d47cc6 Add Debugger to Development package. 2011-12-11 20:59:43 -05:00
Michael Lotz
a15a38c104 Fix use after free. CID 10567. 2011-12-12 01:58:50 +01:00
Rene Gollent
cfb5f18de4 Correct signature mismatch that prevented this symbol from winding up
in the library properly. Fixes DEBUG build.
2011-12-11 19:33:27 -05:00
Rene Gollent
1394478206 This file had CR/LF line endings for some reason. 2011-12-11 19:31:17 -05:00
Michael Lotz
fe10dd20bf Fix indirect use of fState after deleting it.
Calling SetIcon(NULL) calls MakeEmpty() that tries to delete all
manipulators on fState. So we may only delete fState after that call.

Also reported as CID 10856.
2011-12-12 00:26:40 +01:00
Michael Lotz
d86197cec3 Fix build with DEBUG on. 2011-12-11 18:29:55 +01:00
Rene Gollent
d68053959e Flesh out DIESubprogram a bit more.
- Add accessor for return type.
- Implement DW_AT_artificial parsing.
- Store the subprogram's template parameters and provide accessors
  for them as well. Not used yet but will be handy later if/when we
  want to expose the instantiated types somewhere in the user
  interface when stepping into such a function.
2011-12-11 11:20:41 -05:00
Michael Lotz
6ef7d359c7 ASSERT() that there really aren't any wired pages. 2011-12-11 17:08:10 +01:00
Michael Lotz
af09f123d3 Create the right cache type ([non-]swappable) on copy on write.
When forking a team, copy on write areas (and therefore caches) are
created for all the areas in the parent team, but they were always
created as swappable. If the parent team had some B_FULL_LOCK areas,
which aren't swappable, the wrong type of cache would be created which
lead to them not being mergeable later on (causing a panic).

Comments about a possibly cleaner way to figure out the cache type
would be welcome.
2011-12-11 17:08:10 +01:00
Humdinger
0a1ac2bfd8 Added Nikola Miljković as Serbian translator. 2011-12-11 14:08:43 +01:00
Jérôme Duval
86216323af Fixed math.h part of #2696
* added lgammal_r wrapper
* removed gamma_r and gammaf_r functions from math.h
2011-12-11 12:28:53 +01:00
Jérôme Duval
04fccd250f added hcreate, hdestroy, hsearch from glibc 2011-12-11 10:49:18 +01:00
Jérôme Duval
7cd683ba12 fix typo 2011-12-11 10:49:17 +01:00
Rene Gollent
2a8373704a Add missing initialization. 2011-12-10 22:53:19 -05:00
Alexander von Gluck IV
dc0d01abcd Cleanup. Move unions into functions that use them.
* Rename unions to match style guide lines
* Group things that make sense together
* Move AtomBIOS argument struct creation closer to what uses it
2011-12-10 19:59:02 -06:00
Fredrik Holmqvist
34b63b5b9d Remove libbe_build linking m from earlier commit and add -lm to HOST_LINK_FLAGS on non BeOS compatible platforms.
(HOST_LIBROOT would need more work than just adding m so I went the easy route.)
2011-12-11 00:45:44 +01:00
Michael Lotz
44c3f5c188 Clean up the mess added in hrev43461 and solve it differently.
* Define a MEMALIGN macro that is either just defined to malloc() or
  to the actual memalign() depending on where KMessage is used. We only
  use memalign() inside the kernel and libroot.
* Add a comment to the macro explaining that this allows the use of
  special heap implementations that might return unaligned buffers for
  debugging purposes.
2011-12-10 23:20:18 +01:00
Rene Gollent
828294f3df Fix broken handling of nested namespaces.
- If multiple nested namespaces were involved in a name,
  GetFullyQualifiedDIEName() would erroneously wipe out each one
  as it walked up, leaving you with only the top level namespace.

- Don't touch the output parameter unless we're certain we succeeded.
2011-12-10 16:57:05 -05:00
Rene Gollent
216a2c7c89 Fix several broken instances of function name generation.
- Use the artificial attribute to more intelligently determine when to omit
parameters. Fixes the first parameter on static class functions being
skipped incorrectly.

- Correctly handle varargs functions.
2011-12-10 16:50:17 -05:00
Rene Gollent
03da60709c Implement handling of DW_AT_artificial for DIEFormalParameter. 2011-12-10 16:50:15 -05:00
Siarzhuk Zharski
eed9bc771c Use "strlcpy" instead of "strncpy" and other Coverity issues
* Yet more nice way to fix Coverity issues fixed by hrev43460.
  Thanks Rene Gollent for pointing it out!
* Potential Coverity issues fixed for sis19x driver too.
2011-12-10 21:52:16 +01:00
Michael Lotz
e339322a88 Fix hrev43405 by moving the reference above the autolocker.
The change in hrev43405 wasn't correct, as it put the reference
object definition after the one of the corresponding locker, causing
the reference to be released before the unlock would happen.

Finally fixes #8187. Thanks Ingo for pointing that out.
2011-12-10 21:35:40 +01:00
Michael Lotz
bcc4a523b6 Fix invalid use of iterator after erase and lock corruption.
* The call to _TeamDied() causes the team that the iterator points to
  be removed from the map. Therefore the iterator becomes invalid and
  may not be accessed anymore (including incrementing it). As we've had
  to unlock, anything might have happened to to map, so take the safe
  route and just start over.
* For each dead team that was found the AppManager was unlocked, but
  there were no balancing lock calls, therefore causing the lock count
  to get corrupted.
2011-12-10 21:23:35 +01:00
Michael Lotz
5585262bb1 Revert hrev43455 and instead just align the size.
While this isn't really correct, it works for the use case it is
intended and doesn't open the can of worms we get when trying to do
memalign() across platforms (due to build tools use of KMessage).
2011-12-10 21:03:14 +01:00
Michael Lotz
33f0ed7a03 Revert hrev43457.
This reverts commit 82929f8a76.
2011-12-10 21:03:13 +01:00
Michael Lotz
8eff10a8bf Revert hrev43458.
This reverts commit 80e6a84bf0.
2011-12-10 21:03:13 +01:00
Michael Lotz
a173514ad1 Revert hrev43459.
This reverts commit c8a48d783c.
2011-12-10 21:03:12 +01:00
Siarzhuk Zharski
a188dae8be Fixing Coverity issues. No functional changes
CID 3490
CID 3491
CID 8928
CID 10630
CID 10631
CID 10664
CID 10731
CID 10754
CID 11049
CID 11141
CID 11147
CID 11148
2011-12-10 20:46:40 +01:00
Michael Lotz
c8a48d783c Same as hrev43457 (- the error) but for the bootloader heap. 2011-12-10 19:15:10 +01:00